To delete buckets, use the DELETE /pools/default/buckets/[bucket-name] HTTP method and URI.
Bucket deletion is a synchronous operation. When a cluster has multiple servers, some servers might not be able to delete the bucket within the standard 30 second timeout period.
- If the bucket is deleted on all servers within the standard timeout of 30 seconds, a 200 response code is returned.
- If the bucket is not deleted on all servers within the 30 second timeout, a 500 error code is returned.
- If the bucket is not deleted on all servers and another request is made to delete the bucket, a 404 error code is returned.
- If the bucket is not deleted on all servers and a request is made to crate a new bucket with the same name, an error might be returned indicating that the bucket is still being deleted.
HTTP method and URI
Curl request syntax:
curl -X DELETE -u [admin]:[password] http://[localhost]:8091//pools/default/buckets/[bucket-name]
Raw HTTP request syntax:
DELETE /pools/default/buckets/[bucket-name] Host: [localhost]:8091 Authorization: Basic xxxxxxxxxxxxxxxxxxx
Curl request example to delete the bucket named myTestBucket:
curl -X DELETE -u Administrator:password \ http://10.5.2.54:8091/pools/default/buckets/myTestBucket
Raw HTTP request example to delete the bucket named myTestBucket:
DELETE /pools/default/buckets/myTestBucket Host: 10.5.2.54:8091 Authorization: Basic xxxxxxxxxxxxxxxxxxx
|200||OK Bucket Deleted on all nodes|
|404||Object Not Found|
|500||Bucket could not be deleted on all nodes|
|503||Buckets cannot be deleted during a rebalance|