All methods and paths for this operation:
Get high-level information about indices in a cluster, including backing indices for data streams.
Use this request to get the following information for each index in a cluster:
- shard count
- document count
- deleted document count
- primary store size
- total store size of all shards, including shard replicas
These metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents. To get an accurate count of Elasticsearch documents, use the cat count or count APIs.
CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use an index endpoint.
Required authorization
- Index privileges:
monitor - Cluster privileges:
monitor
Path parameters
-
Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (
*). To target all data streams and indices, omit this parameter or use*or_all.
Query parameters
-
The type of index that wildcard patterns can match.
Supported values include:
all: Match any data stream or index, including hidden ones.open: Match open, non-hidden indices. Also matches any non-hidden data stream.closed: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.hidden: Match hidden data streams and hidden indices. Must be combined withopen,closed, orboth.none: Wildcard expressions are not accepted.
Default value is
all. -
The health status used to limit returned indices. By default, the response includes indices of any health status.
Supported values include:
green(orGREEN): All shards are assigned.yellow(orYELLOW): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.red(orRED): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.unknownunavailable
Values are
green,GREEN,yellow,YELLOW,red,RED,unknown, orunavailable. -
If true, the response includes information from segments that are not loaded into memory.
Default value is
false. -
If true, the response only includes information from primary shards.
Default value is
false. -
Period to wait for a connection to the master node.
Default value is
30s. -
List of columns to appear in the response. Supports simple wildcards.
-
List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting
:ascor:descas a suffix to the column name. -
Specifies the format to return the columnar data in, can be set to
text,json,cbor,yaml, orsmile.Default value is
text. -
When set to
truewill output available columns. This option can't be combined with any other query string option.Default value is
false. -
When set to
truewill enable verbose output.Default value is
false. -
Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance
1kbmeans 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such askb,mb, orgb, chosen such that the numeric value of the column is as small as possible whilst still being at least1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.Values are
b,kb,mb,gb,tb, orpb. -
Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as
ms,s,morh, chosen such that the numeric value of the column is as small as possible whilst still being at least1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.Values are
nanos,micros,ms,s,m,h, ord.
GET /_cat/indices/my-index-*?v=true&s=index&format=json
resp = client.cat.indices(
index="my-index-*",
v=True,
s="index",
format="json",
)
const response = await client.cat.indices({
index: "my-index-*",
v: "true",
s: "index",
format: "json",
});
response = client.cat.indices(
index: "my-index-*",
v: "true",
s: "index",
format: "json"
)
$resp = $client->cat()->indices([
"index" => "my-index-*",
"v" => "true",
"s" => "index",
"format" => "json",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/indices/my-index-*?v=true&s=index&format=json"
client.cat().indices();
[
{
"health": "yellow",
"status": "open",
"index": "my-index-000001",
"uuid": "u8FNjxh8Rfy_awN11oDKYQ",
"pri": "1",
"rep": "1",
"docs.count": "1200",
"docs.deleted": "0",
"store.size": "88.1kb",
"pri.store.size": "88.1kb",
"dataset.size": "88.1kb"
},
{
"health": "green",
"status": "open",
"index": "my-index-000002",
"uuid": "nYFWZEO7TUiOjLQXBaYJpA ",
"pri": "1",
"rep": "0",
"docs.count": "0",
"docs.deleted": "0",
"store.size": "260b",
"pri.store.size": "260b",
"dataset.size": "260b"
}
]