Method | DELETE /db/_design/design-doc | |
Request | None | |
Response | JSON of deleted design document | |
Admin Privileges Required | no | |
Query Arguments | Argument | rev |
Description | Current revision of the document for validation | |
Optional | yes | |
Type | string | |
HTTP Headers | Header | If-Match |
Description | Current revision of the document for validation | |
Optional | yes | |
Return Codes | ||
409 | Supplied revision is incorrect or missing |
Delete an existing design document. Deleting a design document also deletes all of the associated view indexes, and recovers the corresponding space on disk for the indexes in question.
To delete, you must specify the current revision of the design
document using the rev
query argument.
For example:
DELETE http://couchdb:5984/recipes/_design/recipes?rev=2-ac58d589b37d01c00f45a4418c5a15a8 Content-Type: application/json
The response contains the delete document ID and revision:
{ "id" : "recipe/_design/recipes" "ok" : true, "rev" : "3-7a05370bff53186cb5d403f861aca154", }