delete #
Deletes a document.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/<index>/<collection>/<documentId>[?refresh=wait_for]
Method: DELETE
Other protocols #
{
"index": "<index>",
"collection": "<collection>",
"controller": "document",
"action": "delete",
"_id": "<documentId>"
}
Arguments #
collection
: collection namedocumentId
: document unique identifierindex
: index name
Optional: #
refresh
: if set towait_for
, Kuzzle will not respond until the deletion has been indexed
Response #
Returns an _id
property with the deleted document unique ID.
{
"status": 200,
"error": null,
"index": "<index>",
"collection": "<collection>",
"controller": "document",
"action": "delete",
"requestId": "<unique request identifier>",
"result": {
"_id": "<documentId>"
}
}
Edit this page on Github(opens new window)