| Method | DELETE /db/doc/attachment | |
| Request | None | |
| Response | JSON status | |
| Admin Privileges Required | no | |
| Query Arguments | Argument | rev |
| Description | Revision of the document to be deleted | |
| Optional | no | |
| Type | string | |
| HTTP Headers | Header | If-Match |
| Description | Current revision of the document for validation | |
| Optional | yes | |
| Return Codes | ||
| 200 | Attachment deleted successfully | |
| 409 | Supplied revision is incorrect or missing | |
Deletes the attachment attachment to the
specified doc. You must supply the
rev argument with the current revision to
delete the attachment.
For example to delete the attachment basic from
the recipe FishStew:
DELETE http://couchdb:5984/recipes/FishStew/basic?rev=9-247bb19a41bfd9bfdaf5ee6e2e05be74 Content-Type: application/json
The returned JSON contains the updated revision information:
{
"id" : "FishStew",
"ok" : true,
"rev" : "10-561bf6b1e27615cee83d1f48fa65dd3e"
}