6.9. DELETE /db/doc/attachment

MethodDELETE /db/doc/attachment
Request None
Response JSON status
Admin Privileges Requiredno
Query ArgumentsArgumentrev
 Description Revision of the document to be deleted
 Optionalno
 Typestring
HTTP HeadersHeaderIf-Match
 DescriptionCurrent revision of the document for validation
 Optionalyes
   
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"
}