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.
Request
- The document declares no server URL.
- Auth
- API key in header Authorization
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The name of the fabric.
Remove the document identified by collection.
Remove the document identified by key.
Query parameters
If set to true, adds the old attribute which displays document revisions.
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.
If set to true, returns only after data has been synced to disk.
Headers
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.
Example response
{
"_id": "test/foo",
"_key": "foo",
"_rev": "_dPRuHxe--_"
}Changes
No recorded changes to this operation across all 1 revision of this API.