You are viewing the documentation for a prerelease version.

View Latest

Dropping a Collection

Scopes can be dropped, by means of the REST API.

Description

Collections are dropped by means of the DELETE /pools/default/buckets/<bucket_name>/collections/<scope_name>/<collection_name> HTTP method and URI.

HTTP Method and URI

DELETE /pools/default/buckets/<bucket_name>/collections/<scope_name>/<collection_name>

Syntax

Curl request syntax is as follows:

curl -X DELETE -v -u [admin]:[password]
  http://<hostname-or-ip>:8091/pools/default/buckets/\
    <bucket_name>/collections/<scope_name>/<collection_name>

Examples

Curl request example:

curl -X DELETE -v -u Administrator:password \
http://localhost:8091/pools/default/buckets/\
testBucket/collections/my_scope/my_collection_in_my_scope_1

Raw HTTP request example:

DELETE /pools/default/buckets/testBucket/collections/my_scope/my_collection_in_my_scope_1 HTTP/1.1
Host: localhost:8091
Content-Type: application/json
Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==

Response example:

{"uid":19}

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.