| Method | DELETE /pools/default/buckets/bucket_name |
| Request Data | None |
| Response Data | None |
| Authentication Required | yes |
| Return Codes | |
| 200 | OK Bucket Deleted on all nodes |
| 401 | Unauthorized |
| 404 | Object Not Found |
| 500 | Bucket could not be deleted on all nodes |
| 503 | Buckets cannot be deleted during a rebalance |
This operation is data destructive.The service makes no attempt to double check with the user. It simply moves forward. Clients applications using this are advised to double check with the end user before sending such a request.
To delete a bucket, you supply the URL of the Couchbase bucket
using the DELETE operation. For example:
DELETE /pools/default/buckets/default Host: localhost:8091 Authorization: Basic xxxxxxxxxxxxxxxxxxx
Bucket deletion is a synchronous operation but because the
cluster may include a number of nodes, they may not all be able
to delete the bucket. If all the nodes delete the bucket within
the standard timeout of 30 seconds, 200 will
be returned. If the bucket cannot be deleted on all nodes within
the 30 second timeout, a 500 is returned.
Further requests to delete the bucket will return a
404 error. Creating a new bucket with the
same name may return an error that the bucket is still being
deleted.