A newer version of this documentation is available.

View Latest

Dropping a Scope

  • Developer Preview
    +
    Scopes can be dropped, by means of the REST API.

    Description

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

    HTTP Method and URI

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

    Syntax

    Curl request syntax:

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

    Example

    Curl request example:

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

    Raw HTTP request example:

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

    Response example:

    {"uid":20}

    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.