To delete a design document, you use the
DELETE HTTP request with the URL of the
corresponding design document. The summary information for this
request is shown in the table below:
|Request Data||Design document definition (JSON)|
|Response Data||Success and confirmed design document ID|
|200||Request completed successfully.|
|401||The item requested was not available using the supplied authorization, or authorization was not supplied.|
|404||The requested content could not be found. The returned content will include further information, as a JSON object, if available.|
Deleting a design document immediately invalidates the design document and all views and indexes associated with it. The indexes and stored data on disk are removed in the background.
For example, to delete the previously created design document using curl:
shell> curl -v -X DELETE -H 'Content-Type: application/json' \ 'http://Administrator:Password@192.168.0.77:8092/default/_design/dev_byfield'
When the design document has been successfully removed, the JSON returned indidicates successful completion, and confirmation of the design document removed:
Error conditions will be returned if the authorization is incorrect, or the specified design document cannot be found.