Documents

Remove a document

If silent is set to false, the body of the response contains a JSON object with the information about the handle and the revision.

  • _id contains the known key of the removed document.
  • _key contains the key which uniquely identifies a document.
  • _rev contains the document revision.

If the query parameter returnOld is true, the previous revision of the document is returned under the old attribute in the result.

delete/_fabric/{fabric}/_api/document/{collection}/{key}

Request

Path parameters

fabricstring string required

The name of the fabric.

collectionstring string required

Remove the document identified by collection.

keystring string required

Remove the document identified by key.

Query parameters

returnOldboolean

If set to true, adds the old attribute which displays document revisions.

silentboolean

If set to true, an empty object is returned as response. No meta-data is returned for the removed document. This option can be used to save some network traffic.

waitForSyncboolean

If set to true, returns only after data has been synced to disk.

Headers

If-Matchstring

You can conditionally remove a document based on a target revision id by using the if-match HTTP header.

Response

Successfully removed document when waitForSync is enabled.

_idstring

ID of the collection.

_keystring

_key details of collection.

_revstring

_rev details of collection.

Example response

{
  "_id": "test/foo",
  "_key": "foo",
  "_rev": "_dPRuHxe--_"
}

Changes

No recorded changes to this operation across all 1 revision of this API.