Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 1.8
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
8 REST API for Administration
Chapter Sections
Chapters

8.28. Flushing a Bucket

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.

Note

As of Couchbase 1.6 bucket flushing via REST API is not supported. Flushing via Couchbase SDKs as of Couchbase Server 1.8.1 is disabled by default.

The bucket details provide a bucket URI at which a simple request can be made to flush the bucket.

HTTP Request
POST /pools/default/buckets/default/controller/doFlush
Host: node.in.your.pool.com
Authorization: Basic xxxxxxxxxxxxxxxxxxx
X-memcachekv-Store-Client-Specification-Version: 0.1

You can use any HTTP parameters in this request. Since the URI is in the bucket details, neither the URI nor the parameters control what is actually done by the service. The simple requirement is for a POST is that it has an appropriate authorization header, if the system is secured.

HTTP Response, if the flush is successful

HTTP Response
204 No Content

Possible errors include:

404 Not Found

Couchbase Server will return a HTTP 404 response if the URI is invalid or if it does not correspond to a bucket in the system.