DELETE /{db}/{local-doc-id}

In this document

This request deletes a local document.

Request


Request headers

Query parameters

NameTypeDescriptionDefault
batch stringStores the document in batch mode. To use, set the value to ok.none
rev stringRevision identifiernone

Message body

None

Response


Status codes

Response headers

Message body

The response is a JSON document that contains the following objects:

NameTypeDescription
id StringDocument identifier
ok BooleanIndicates whether the operation was successful
rev Stringrevision identifier

Example


The following example deletes a local document with the identifier _local/RecipeLists and revision identifier 2-local from a database named cookbook.

Request

DELETE /cookbook/_local/RecipeLists?rev=2-local HTTP/1.1
Host: localhost:59840

Response

HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Type: application/json
Date: Mon, 21 Apr 2014 21:28:11 GMT
Etag: "(null)"
Server: CouchbaseLite 1.495
Transfer-Encoding: chunked
{
  "id" : "_local/RecipeLists",
  "ok" : true
}