Core
API v2.x
2

exists #

Available since 2.0.0

Checks if a document exists.


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/<index>/<collection>/<_id>/_exists
Method: GET

Other protocols #

Copied to clipboard!
{
  "index": "<index>",
  "collection": "<collection>",
  "controller": "document",
  "action": "exists",
  "_id": "<documentId>"
}

Arguments #

  • _id: document unique identifier
  • collection: collection name
  • index: index name

Response #

Returns a boolean.

Copied to clipboard!
{
  "status": 200,
  "error": null,
  "index": "<index>",
  "collection": "<collection>",
  "controller": "document",
  "action": "exists",
  "requestId": "<unique request identifier>",
  "result": true
}