Listing Scopes and Collections
- Developer Preview
Scopes and collections can be listed, by means of the REST API.
Description
Scopes and collections are listed by means of the GET /pools/default/buckets/<bucket_name>/collections/
HTTP method and URI.
Syntax
Curl request syntax is as follows:
curl -X GET -v -u [admin]:[password] http://<hostname-or-ip>:8091/pools/default/buckets/<bucket_name>/collections
Examples
Curl example:
curl -X GET -v -u Administrator:password \ http://127.0.0.1:8091/pools/default/buckets/testBucket/collections
Raw HTTP request example:
GET /pools/default/buckets/testBucket/collections HTTP/1.1 Host: 127.0.0.1:8091 Content-Type: application/json Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
Response example:
{"_default":{"_default":{}}}
Response codes:
HTTP/1.1 200 OK HTTP/1.1 401 Unauthorized HTTP/1.1 404 Object Not Found
Possible errors:
Requested resource not found.