younifyd
Menu

State (GET /_cluster/state/{metric}/{index})

State

GET/_cluster/state/{metric}/{index}

Use it in a workflow

  1. Add a step and choose the OpenSearch connector.
  2. Pick the State (GET /_cluster/state/{metric}/{index}) action (under cluster).
  3. Fill in the fields below, then reference the result from later steps as {{stateGetClusterStateMetricIndex.response.data}}.

Request

Path parameters

indexoneOfrequired

A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.

metricarray<string>required

Limits the information returned to only the [specified metric groups](https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/#metric-groups).

Query parameters

allow_no_indicesboolean

Whether to ignore a wildcard index expression that resolves into no concrete indexes. This includes the `_all` string or when no indexes have been specified.

cluster_manager_timeoutstring

The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).

expand_wildcardsoneOf

Specifies the type of index that wildcard expressions can match. Supports comma-separated values.

flat_settingsboolean

Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings. For example, the flat form of `"cluster": { "max_shards_per_node": 500 }` is `"cluster.max_shards_per_node": "500"`.

Default false

ignore_unavailableboolean

Whether the specified concrete indexes should be ignored when unavailable (missing or closed).

localboolean

Whether to return information from the local node only instead of from the cluster manager node.

Default false

master_timeoutstring

A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts `0` without a unit and `-1` to indicate an unspecified value.

wait_for_metadata_versioninteger (int64)

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

wait_for_timeoutstring

The maximum time to wait for `wait_for_metadata_version` before timing out.

prettyboolean

Whether to pretty-format the returned JSON response.

Default false

humanboolean

Whether to return human-readable values for statistics.

Default false

error_traceboolean

Whether to include the stack trace of returned errors.

Default false

sourcestring

The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

filter_pathoneOf

A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.

Response

Returns 200 with a any. Read it in later steps with {{stateGetClusterStateMetricIndex.response.data.<field>}}.

Need more? See the OpenSearch guide for connection setup and behaviour shared by every action.