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.
Required authorization
- Index privileges:
monitor - Cluster privileges:
monitor
Query parameters
-
List of columns to appear in the response. Supports simple wildcards.
Values are
completion.size,cs,completionSize,dataset.size,dense_vector.value_count,dvc,denseVectorCount,docs,d,dc,fielddata.evictions,fe,fielddataEvictions,fielddata.memory_size,fm,fielddataMemory,flush.total,ft,flushTotal,flush.total_time,ftt,flushTotalTime,get.current,gc,getCurrent,get.exists_time,geti,getExistsTime,get.exists_total,geto,getExistsTotal,get.missing_time,gmti,getMissingTime,get.missing_total,gmto,getMissingTotal,get.time,gti,getTime,get.total,gto,getTotal,id,index,i,idx,indexing.delete_current,idc,indexingDeleteCurrent,indexing.delete_time,idti,indexingDeleteTime,indexing.delete_total,idto,indexingDeleteTotal,indexing.index_current,iic,indexingIndexCurrent,indexing.index_failed_due_to_version_conflict,iifvc,indexingIndexFailedDueToVersionConflict,indexing.index_failed,iif,indexingIndexFailed,indexing.index_time,iiti,indexingIndexTime,indexing.index_total,iito,indexingIndexTotal,ip,merges.current,mc,mergesCurrent,merges.current_docs,mcd,mergesCurrentDocs,merges.current_size,mcs,mergesCurrentSize,merges.total,mt,mergesTotal,merges.total_docs,mtd,mergesTotalDocs,merges.total_size,mts,mergesTotalSize,merges.total_time,mtt,mergesTotalTime,node,n,prirep,p,pr,primaryOrReplica,query_cache.evictions,qce,queryCacheEvictions,query_cache.memory_size,qcm,queryCacheMemory,recoverysource.type,rs,refresh.time,rti,refreshTime,refresh.total,rto,refreshTotal,search.fetch_current,sfc,searchFetchCurrent,search.fetch_time,sfti,searchFetchTime,search.fetch_total,sfto,searchFetchTotal,search.open_contexts,so,searchOpenContexts,search.query_current,sqc,searchQueryCurrent,search.query_time,sqti,searchQueryTime,search.query_total,sqto,searchQueryTotal,search.scroll_current,scc,searchScrollCurrent,search.scroll_time,scti,searchScrollTime,search.scroll_total,scto,searchScrollTotal,segments.count,sc,segmentsCount,segments.fixed_bitset_memory,sfbm,fixedBitsetMemory,segments.index_writer_memory,siwm,segmentsIndexWriterMemory,segments.memory,sm,segmentsMemory,segments.version_map_memory,svmm,segmentsVersionMapMemory,seq_no.global_checkpoint,sqg,globalCheckpoint,seq_no.local_checkpoint,sql,localCheckpoint,seq_no.max,sqm,maxSeqNo,shard,s,sh,dsparse_vector.value_count,svc,sparseVectorCount,state,st,store,sto,suggest.current,suc,suggestCurrent,suggest.time,suti,suggestTime,suggest.total,suto,suggestTotal,sync_id,unassigned.at,ua,unassigned.details,ud,unassigned.for,uf,unassigned.reason, orur. -
A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting
:ascor:descas a suffix to the column name. -
The period to wait for a connection to the master node.
Values are
-1or0.External documentation
curl \
--request GET 'http://api.example.com/_cat/shards'
[
{
"index": "my-index-000001",
"shard": "0",
"prirep": "p",
"state": "STARTED",
"docs": "3014",
"store": "31.1mb",
"dataset": "249b",
"ip": "192.168.56.10",
"node": "H5dfFeA"
}
]
[
{
"index": "my-index-000001",
"shard": "0",
"prirep": "p",
"state": "STARTED",
"docs": "3014",
"store": "31.1mb",
"dataset": "249b",
"ip": "192.168.56.10",
"node": "H5dfFeA"
}
]
[
{
"index": "my-index-000001",
"shard": "0",
"prirep": "p",
"state": "RELOCATING",
"docs": "3014",
"store": "31.1mb",
"dataset": "249b",
"ip": "192.168.56.10",
"node": "H5dfFeA -> -> 192.168.56.30 bGG90GE"
}
]
[
{
"index": "my-index-000001",
"shard": "0",
"prirep": "p",
"state": "STARTED",
"docs": "3014",
"store": "31.1mb",
"dataset": "249b",
"ip": "192.168.56.10",
"node": "H5dfFeA"
},
{
"index": "my-index-000001",
"shard": "0",
"prirep": "r",
"state": "INITIALIZING",
"docs": "0",
"store": "14.3mb",
"dataset": "249b",
"ip": "192.168.56.30",
"node": "bGG90GE"
}
]
[
{
"index": "my-index-000001",
"shard": "0",
"prirep": "p",
"state": "STARTED",
"unassigned.reason": "3014 31.1mb 192.168.56.10 H5dfFeA"
},
{
"index": "my-index-000001",
"shard": "0",
"prirep": "r",
"state": "STARTED",
"unassigned.reason": "3014 31.1mb 192.168.56.30 bGG90GE"
},
{
"index": "my-index-000001",
"shard": "0",
"prirep": "r",
"state": "STARTED",
"unassigned.reason": "3014 31.1mb 192.168.56.20 I8hydUG"
},
{
"index": "my-index-000001",
"shard": "0",
"prirep": "r",
"state": "UNASSIGNED",
"unassigned.reason": "ALLOCATION_FAILED"
}
]