IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
cat count API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
cat count API
editProvides quick access to a document count of individual indices or all indices in a cluster.
The document count only includes live documents, not deleted documents which have not yet been removed by the merge process.
Path parameters
edit-
<index> - (Optional, string) Comma-separated list or wildcard expression of index names used to limit the request.
Query parameters
edit-
format - (Optional, string) Short version of the HTTP accept header. Valid values include JSON, YAML, etc.
-
h - (Optional, string) Comma-separated list of column names to display.
-
help -
(Optional, boolean) If
true, the response includes help information. Defaults tofalse. -
s - (Optional, string) Comma-separated list of column names or column aliases used to sort the response.
-
v -
(Optional, boolean) If
true, the response includes column headings. Defaults tofalse.
Examples
editExample with an individual index
editThe following count API request retrieves the document count of a single
index, twitter.
GET /_cat/count/twitter?v
The API returns the following response:
epoch timestamp count 1475868259 15:24:20 120
Example with all indices in a cluster
editThe following count API request retrieves the document count of all indices in
the cluster.
GET /_cat/count?v
The API returns the following response:
epoch timestamp count 1475868259 15:24:20 121