see on GitHub

Delete Documents

Basic Example

An example cURL request to a database named "Example" on our playground server to delete the document "employees/1-A":

curl -X DELETE


HTTP/1.1 204
status: 204
Server: nginx
Date: Tue, 27 Aug 2019 11:40:12 GMT
Connection: keep-alive

Request Format

curl -X DELETE <server URL>/databases/<database name>/docs?id=<document ID> \
--header 'If-Match: <expected change vector>'

Query Parameters Description Required
id ID of a document to be deleted. Yes
Headers Description Required
If-Match Expected change vector. If it matches the server-side change vector the document is deleted, if they don't match a concurrency exception is thrown. No

Response Format

Header Description
Content-Type MIME media type and character encoding. This should always be: application/json; charset=utf-8.
Raven-Server-Version Version or RavenDB the responding server is running
HTTP Status Code Description
204 The document was successfully deleted, or no document with the specified ID exists.
409 The change vector submitted did not match the server-side change vector. A concurrency exception was thrown.