Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 2.0
Community Wiki and Resources
Download Couchbase Server 2.0
Couchbase Developer Guide 2.0
Client Libraries
Couchbase Server Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
8.6 Managing Buckets
Chapter Sections
Chapters

8.6.11. Deleting a Bucket

MethodDELETE /pools/default/buckets/bucket_name
Request DataNone
Response DataNone
Authentication Requiredyes
 Return Codes
200OK Bucket Deleted on all nodes
401Unauthorized
404Object Not Found
500Bucket could not be deleted on all nodes
503Buckets cannot be deleted during a rebalance

Warning

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:

HTTP Request
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.