Get data stream lifecycles Generally available; Added in 8.11.0
Get the data stream lifecycle configuration of one or more data streams.
Path parameters
-
Comma-separated list of data streams to limit the request. Supports wildcards (
*). To target all data streams, omit this parameter or use*or_all.
Query parameters
-
Type of data stream that wildcard patterns can match. Supports comma-separated values, such as
open,hidden.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 are
all,open,closed,hidden, ornone. -
If
true, return all default settings in the response. -
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
External documentation
GET /_data_stream/{name}/_lifecycle
Console
GET /_data_stream/{name}/_lifecycle?human&pretty resp = client.indices.get_data_lifecycle( name="{name}", human=True, pretty=True, ) const response = await client.indices.getDataLifecycle({ name: "{name}", human: "true", pretty: "true", }); response = client.indices.get_data_lifecycle( name: "{name}", human: "true", pretty: "true" ) $resp = $client->indices()->getDataLifecycle([ "name" => "{name}", "human" => "true", "pretty" => "true", ]); curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_data_stream/%7Bname%7D/_lifecycle?human&pretty" Response examples (200)
A successful response from `GET /_data_stream/{name}/_lifecycle?human&pretty`.
{ "data_streams": [ { "name": "my-data-stream-1", "lifecycle": { "enabled": true, "data_retention": "7d" } }, { "name": "my-data-stream-2", "lifecycle": { "enabled": true, "data_retention": "7d" } } ] }