cluster.state

edit
client.cluster.state({
  index: string | string[],
  metric: string | string[],
  local: boolean,
  master_timeout: string,
  flat_settings: boolean,
  wait_for_metadata_version: number,
  wait_for_timeout: string,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'none' | 'all'
})

Reference

index

string | string[] - A comma-separated list of index names; use _all or empty string to perform the operation on all indices

metric

string | string[] - Limit the information returned to the specified metrics

local

boolean - Return local information, do not retrieve the state from master node (default: false)

master_timeout or masterTimeout

string - Specify timeout for connection to master

flat_settings or flatSettings

boolean - Return settings in flat format (default: false)

wait_for_metadata_version or waitForMetadataVersion

number - Wait for the metadata version to be equal or greater than the specified metadata version

wait_for_timeout or waitForTimeout

string - The maximum time to wait for wait_for_metadata_version before timing out

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open