Listing Scopes and Collections
Scopes and collections can be listed, by means of the REST API.
Scopes and collections are listed by means of the
GET /pools/default/buckets/<bucket_name>/scopes/ HTTP method and URI.
The curl syntax is as follows:
curl -X GET -v http://<hostname-or-ip>:8091/pools/default/buckets/<bucket_name>/scopes -u <username>:<password>
<bucket-name> path-parameter specifies the name of the bucket whose defined collections are to be listed.
Failure to authenticate gives
A malformed URI fails with
404 Object Not Found.
The following example lists the collections in a bucket named
curl -X GET -v -u Administrator:password \ http://10.143.210.101:8091/pools/default/buckets/testBucket/scopes
If successful, the call returns
200 OK, and an object listing scopes and collections.