delete #
Deletes an asset.
See also the document:delete API action.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/device-manager/:index/assets/:_id[?refresh=wait_for][&source]
Method: DELETE
Other protocols #
{
"index": "<index>",
"controller": "device-manager/asset",
"action": "delete",
"_id": "<assetId>"
}
Kourou #
kourou device-manager/asset:delete <index> --id <assetId>
Arguments #
index
: index name
Optional: #
refresh
: if set towait_for
, Kuzzle will not respond until the delete is indexedsource
: if set totrue
Kuzzle will return the entire deleted document body in the response.
Response #
Returns information about the deleted asset:
_id
: asset unique identifier_source
: deleted asset source, only if thesource
option is set totrue
{
"status": 200,
"error": null,
"index": "<index>",
"controller": "device-manager/asset",
"action": "delete",
"requestId": "<unique request identifier>",
"result": {
"_id": "<assetId>",
"_source": "<deleted document>" // If `source` option is set to true
}
}