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