Core
API v1.x
1

mDelete #

Deletes multiple documents.


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/<index>/<collection>/_mDelete[?refresh=wait_for]
Method: DELETE
Body:
Copied to clipboard!
{
  "ids": ["<documentId>", "<anotherDocumentId>"]
}

Other protocols #

Copied to clipboard!
{
  "index": "<index>",
  "collection": "<collection>",
  "controller": "document",
  "action": "mDelete",
  "body": {
    "ids": ["<documentId>", "<anotherDocumentId>"]
  }
}

Arguments #

  • collection: collection name
  • index: index name

Optional: #

  • refresh: if set to wait_for, Kuzzle will not respond until the deletions are indexed

Body properties #

  • ids: an array of document identifiers to delete

Response #

Returns an array with the list of successfully deleted document identifiers.

If one or more document deletions fail, the response status is set to 206, and the error object contain a partial error error.

Copied to clipboard!
{
  "status": 200,
  "error": null,
  "index": "<index>",
  "collection": "<collection>",
  "action": "mDelete",
  "controller": "document",
  "requestId": "<unique request identifier>",
  "result": [
    "<documentId>",
    "<anotherDocumentId>"
  ]
}