Get shard information
Get information about the shards in a cluster. For data streams, the API returns information about the backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.
Query parameters
-
bytes string
The unit used to display byte values.
Values are
b
,kb
,mb
,gb
,tb
, orpb
. -
master_timeout string
Period to wait for a connection to the master node.
-
time string
Unit used to display time values.
Values are
nanos
,micros
,ms
,s
,m
,h
, ord
.
GET
/_cat/shards
curl \
-X GET http://api.example.com/_cat/shards
Response examples (200)
[
{
"index": "string",
"shard": "string",
"prirep": "string",
"state": "string",
"docs": "string",
"store": "string",
"dataset": "string",
"ip": "string",
"id": "string",
"node": "string",
"sync_id": "string",
"unassigned.reason": "string",
"unassigned.at": "string",
"unassigned.for": "string",
"unassigned.details": "string",
"recoverysource.type": "string",
"completion.size": "string",
"fielddata.memory_size": "string",
"fielddata.evictions": "string",
"query_cache.memory_size": "string",
"query_cache.evictions": "string",
"flush.total": "string",
"flush.total_time": "string",
"get.current": "string",
"get.time": "string",
"get.total": "string",
"get.exists_time": "string",
"get.exists_total": "string",
"get.missing_time": "string",
"get.missing_total": "string",
"indexing.delete_current": "string",
"indexing.delete_time": "string",
"indexing.delete_total": "string",
"indexing.index_current": "string",
"indexing.index_time": "string",
"indexing.index_total": "string",
"indexing.index_failed": "string",
"merges.current": "string",
"merges.current_docs": "string",
"merges.current_size": "string",
"merges.total": "string",
"merges.total_docs": "string",
"merges.total_size": "string",
"merges.total_time": "string",
"refresh.total": "string",
"refresh.time": "string",
"refresh.external_total": "string",
"refresh.external_time": "string",
"refresh.listeners": "string",
"search.fetch_current": "string",
"search.fetch_time": "string",
"search.fetch_total": "string",
"search.open_contexts": "string",
"search.query_current": "string",
"search.query_time": "string",
"search.query_total": "string",
"search.scroll_current": "string",
"search.scroll_time": "string",
"search.scroll_total": "string",
"segments.count": "string",
"segments.memory": "string",
"segments.index_writer_memory": "string",
"segments.version_map_memory": "string",
"segments.fixed_bitset_memory": "string",
"seq_no.max": "string",
"seq_no.local_checkpoint": "string",
"seq_no.global_checkpoint": "string",
"warmer.current": "string",
"warmer.total": "string",
"warmer.total_time": "string",
"path.data": "string",
"path.state": "string",
"bulk.total_operations": "string",
"bulk.total_time": "string",
"bulk.total_size_in_bytes": "string",
"bulk.avg_time": "string",
"bulk.avg_size_in_bytes": "string"
}
]
Response examples (200)
A single data stream or index
A successful response from `GET _cat/shards`.
my-index-000001 0 p STARTED 3014 31.1mb 192.168.56.10 H5dfFeA
A successful response from `GET _cat/shards/my-index-*`. It returns information for any data streams or indices beginning with `my-index-`.
my-index-000001 0 p STARTED 3014 31.1mb 192.168.56.10 H5dfFeA
A successful response from `GET _cat/shards`. The `RELOCATING` value in the `state` column indicates the index shard is relocating.
my-index-000001 0 p RELOCATING 3014 31.1mb 192.168.56.10 H5dfFeA -> -> 192.168.56.30 bGG90GE
A successful response from `GET _cat/shards`. Before a shard is available for use, it goes through an `INITIALIZING` state. You can use the cat shards API to see which shards are initializing.
my-index-000001 0 p STARTED 3014 31.1mb 192.168.56.10 H5dfFeA
my-index-000001 0 r INITIALIZING 0 14.3mb 192.168.56.30 bGG90GE
A successful response from `GET _cat/shards?h=index,shard,prirep,state,unassigned.reason`. It includes the `unassigned.reason` column, which indicates why a shard is unassigned.
my-index-000001 0 p STARTED 3014 31.1mb 192.168.56.10 H5dfFeA
my-index-000001 0 r STARTED 3014 31.1mb 192.168.56.30 bGG90GE
my-index-000001 0 r STARTED 3014 31.1mb 192.168.56.20 I8hydUG
my-index-000001 0 r UNASSIGNED ALLOCATION_FAILED