Get data stream APIedit

Retrieves information about one or more data streams. See Get information about a data stream.

GET /_data_stream/my-data-stream

Requestedit

GET /_data_stream/<data-stream>

Path parametersedit

<data-stream>
(Required, string) Name of the data stream to retrieve. Wildcard (*) expressions are supported.

Response bodyedit

data_streams

(array of objects) Contains information about retrieved data streams.

Properties of objects in data_streams
name
(string) Name of the data stream.
timestamp_field

(object) Contains information about the data stream’s timestamp field.

Properties of timestamp_field
name
(string) Name of the data stream’s timestamp field. This field must be included in every document indexed to the data stream.
indices

(array of objects) Array of objects containing information about the data stream’s backing indices.

The last item in this array contains information about the stream’s current write index.

Properties of indices objects
index_name
(string) Name of the backing index. For naming conventions, see Generation.
index_uuid
(string) Universally unique identifier (UUID) for the index.
generation
(integer) Current generation for the data stream. This number acts as a cumulative count of the stream’s backing indices, including deleted indices.
status

(string) Health status of the data stream.

This health status is based on the state of the primary and replica shards of the stream’s backing indices.

Values for status
green
All shards are assigned.
yellow
All primary shards are assigned, but one or more replica shards are unassigned.
red
One or more primary shards are unassigned, so some data is unavailable.
template

(string) Name of the index template used to create the data stream’s backing indices.

The template’s index pattern must match the name of this data stream. See Create an index template for a data stream.

ilm_policy

(string) Name of the current ILM lifecycle policy in the stream’s matching index template. This lifecycle policy is set in the index.lifecycle.name setting.

If the template does not include a lifecycle policy, this property is not included in the response.

A data stream’s backing indices may be assigned different lifecycle policies. To retrieve the lifecycle policy for individual backing indices, use the get index settings API.

Examplesedit

GET _data_stream/my-data-stream*

The API returns the following response:

{
  "data_streams": [
    {
      "name": "my-data-stream",
      "timestamp_field": {
        "name": "@timestamp"
      },
      "indices": [
        {
          "index_name": ".ds-my-data-stream-000001",
          "index_uuid": "xCEhwsp8Tey0-FLNFYVwSg"
        },
        {
          "index_name": ".ds-my-data-stream-000002",
          "index_uuid": "PA_JquKGSiKcAKBA8DJ5gw"
        }
      ],
      "generation": 2,
      "status": "GREEN",
      "template": "my-index-template",
      "ilm_policy": "my-lifecycle-policy"
    },
    {
      "name": "my-data-stream_two",
      "timestamp_field": {
        "name": "@timestamp"
      },
      "indices": [
        {
          "index_name": ".ds-my-data-stream_two-000001",
          "index_uuid": "3liBu2SYS5axasRt6fUIpA"
        }
      ],
      "generation": 1,
      "status": "YELLOW",
      "template": "my-index-template",
      "ilm_policy": "my-lifecycle-policy"
    }
  ]
}