count

URL: http://kuzzle:7512/<index>/<collection>/_count
Method: POST
Body:

{
  // A set of filters or queries matching documents you are looking for.
  // Use "query" instead of "filter" if you want to perform a query instead.
  "filter": {
    ...
  }
}

Query:

{
  "index": "<index>",
  "collection": "<collection>",
  "controller": "document",
  "action": "count",

  "body": {
    "filter": {}
  }
}

Response

{
  "status": 200,
  "error": null,
  "index": "<index>",
  "collection": "<collection>",
  "controller": "document",
  "action": "count",
  "requestId": "<unique request identifier>",
  "result": {
    "count": "<number of found documents>"
  }
}

Given some filters, gets the number of matching documents from Kuzzle's data storage layer.

Kuzzle uses the ElasticSearch Query DSL syntax.