Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-42712

REST API for creating scope is confusing

    XMLWordPrintable

Details

    • 1

    Description

      I am not sure what to suggest as the improvement here. But I was quite confused that to create a scope I have to use a rest end point 'collections'. I understand that the feature name is collections and maybe that is why this was chosen. 

      curl -X POST -v -u Administrator:password \ http://10.143.210.101:8091/pools/default/buckets/testBucket/collections \ -d name=my_scope

       If it is not too late, can we change the end point to 'scopes'? 

      cc Jim Walker

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            lynn.straus Lynn Straus added a comment -

            Linking the related tickets for tracking.

            lynn.straus Lynn Straus added a comment - Linking the related tickets for tracking.

            I have reopened this, as the bulk API change is being debated, I want to ensure we don't forget about this. I have attached a link to the google doc debating the change too.

            pvarley Patrick Varley added a comment - I have reopened this, as the bulk API change is being debated, I want to ensure we don't forget about this. I have attached a link to the google doc debating the change too.

            The API has been changed to
            PUT pools/default/buckets/[bucket-name]/scopes (previously "scopes" was "collections").

            steve.watanabe Steve Watanabe added a comment - The API has been changed to PUT pools/default/buckets/ [bucket-name] /scopes (previously "scopes" was "collections").

            Build couchbase-server-7.0.0-3920 contains ns_server commit 39f3dcf with commit message:
            MB-42712 Update scopes/collections bulk api

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-3920 contains ns_server commit 39f3dcf with commit message: MB-42712 Update scopes/collections bulk api

            Verified on 7.0.0-4670

            curl -X POST -v -u Administrator:password http://localhost:8091/pools/default/buckets/default/scopes -d name=new_scope1

            • About to connect() to localhost port 8091 (#0)
            • Trying ::1...
            • Connected to localhost (::1) port 8091 (#0)
            • Server auth using Basic with user 'Administrator'
              > POST /pools/default/buckets/default/scopes HTTP/1.1
              > Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
              > User-Agent: curl/7.29.0
              > Host: localhost:8091
              > Accept: /
              > Content-Length: 15
              > Content-Type: application/x-www-form-urlencoded
              >
            • upload completely sent off: 15 out of 15 bytes
              < HTTP/1.1 200 OK
              < Cache-Control: no-cache,no-store,must-revalidate
              < Content-Length: 11
              < Content-Type: application/json
              < Date: Wed, 17 Mar 2021 06:22:16 GMT
              < Expires: Thu, 01 Jan 1970 00:00:00 GMT
              < Pragma: no-cache
              < Server: Couchbase Server
              < X-Content-Type-Options: nosniff
              < X-Frame-Options: DENY
              < X-Permitted-Cross-Domain-Policies: none
              < X-XSS-Protection: 1; mode=block
              <
            • Connection #0 to host localhost left intact {"uid":"3"}

              [root@node1-cb600-centos7 logs]#

            anitha.kuberan Anitha Kuberan added a comment - Verified on 7.0.0-4670 curl -X POST -v -u Administrator:password http://localhost:8091/pools/default/buckets/default/scopes -d name=new_scope1 About to connect() to localhost port 8091 (#0) Trying ::1... Connected to localhost (::1) port 8091 (#0) Server auth using Basic with user 'Administrator' > POST /pools/default/buckets/default/scopes HTTP/1.1 > Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA== > User-Agent: curl/7.29.0 > Host: localhost:8091 > Accept: / > Content-Length: 15 > Content-Type: application/x-www-form-urlencoded > upload completely sent off: 15 out of 15 bytes < HTTP/1.1 200 OK < Cache-Control: no-cache,no-store,must-revalidate < Content-Length: 11 < Content-Type: application/json < Date: Wed, 17 Mar 2021 06:22:16 GMT < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Pragma: no-cache < Server: Couchbase Server < X-Content-Type-Options: nosniff < X-Frame-Options: DENY < X-Permitted-Cross-Domain-Policies: none < X-XSS-Protection: 1; mode=block < Connection #0 to host localhost left intact {"uid":"3"} [root@node1-cb600-centos7 logs] #

            People

              steve.watanabe Steve Watanabe
              shivani.gupta Shivani Gupta
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty