Get index shard stores
- GET /{index}/_shard_stores
- GET /_shard_stores
Get store information about replica shards in one or more indices. For data streams, the API retrieves store information for the stream's backing indices.
The index shard stores API returns the following information:
- The node on which each replica shard exists.
- The allocation ID for each replica shard.
- A unique ID for each replica shard.
- Any errors encountered while opening the shard index or from an earlier failure.
By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards.
- Index privileges:
monitor
Path Parameters
-
indexIndexName | IndexNameoptional -
List of data streams, indices, and aliases used to limit the request.
Leave it out to use
/_shard_stores.
Query Parameters
-
allow_no_indicesboolean A setting that does two separate checks on the index expression. If
false, the request returns an error (1) if any wildcard expression (including_alland*) resolves to zero matching indices or (2) if the complete set of resolved indices, aliases or data streams is empty after all expressions are evaluated. Iftrue, index expressions that resolve to no indices are allowed and the request returns an empty result.-
expand_wildcardsstring ExpandWildcards · default: open Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
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.
-
Values:
allopenclosedhiddennone If
false, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable. Iftrue, unavailable concrete targets are silently ignored.-
statusShardStoreStatus | ShardStoreStatus List of shard health statuses used to limit the request.
Supported values include:
green: The primary shard and all replica shards are assigned.yellow: One or more replica shards are unassigned.red: The primary shard is unassigned.all: Return all shards, regardless of health status.
-
Values:
greenyellowredall
Response
-
indicesmap string to IndicesShardStoresrequired -
<string>IndicesShardStores -
shardsmap string to ShardStoreWrapperrequired -
<string>ShardStoreWrapper -
storesShardStorerequired -
allocationShardStoreAllocationrequired -
The status of the store copy, whether it is used as a primary, replica, or not used at all.
Supported values include:
primary: The store copy is used as a primary shard.replica: The store copy is used as a replica shard.unused: The store copy is not used.
-
Values:
primaryreplicaunused -
allocation_idstring Id -
The allocation ID of the store copy.
-
store_exceptionShardStoreException -
Any exception encountered while opening the shard index or from an earlier engine failure.