DELETE /{db}
This request deletes a database, including all documents and attachments.
Request
Request headers
This request does not have any required headers.
Query parameters
This request does not use query parameters.
Message body
This request does not use a message body.
Response
Status codes
- 200 OK – Database removed successfully
- 400 Bad Request – Invalid database name
- 401 Unauthorized – Couchbase Server Administrator privileges required
- 404 Not Found – Database doesn’t exist
Response headers
This response uses only standard HTTP headers.
Message body
The response contains a JSON document that contains some of the following objects:
| Name | Type | Description |
|---|---|---|
error | String | Error message |
ok | Boolean | Indicates whether the operation was successful |
status | Integer | HTTP error code |
Example
Request
DELETE /genealogy HTTP/1.1
Host: localhost:59840
Response
HTTP/1.1 200 OK
Content-Type: application/json
Accept-Ranges: bytes
Content-Length: 18
Server: CouchbaseLite 1.485
Date: Mon, 09 Dec 2013 04:24:05 GMT
{
"ok" : true
}