Get data stream API

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

  1. GET /_data_stream/my-data-stream

Request

GET /_data_stream/<data-stream>

Path parameters

<data-stream>

(Optional, string) Comma-separated list of data stream names used to limit the request. Wildcard (*) expressions are supported. If omitted, all data streams will be returned.

Response body

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, which must be @timestamp. The @timestamp field must be included in every document indexed to the data stream.

  1. `indices`
  2. (array of objects) Array of objects containing information about the data streams backing indices.
  3. The last item in this array contains information about the streams current [write index]($4618071bf1c879cb.md#data-stream-write-index "Write index").
  4. Properties of `indices` objects
  5. - `index_name`
  6. (string) Name of the backing index. For naming conventions, see [Generation]($4618071bf1c879cb.md#data-streams-generation "Generation").
  7. `index_uuid`
  8. (string) Universally unique identifier (UUID) for the index.
  9. `generation`
  10. (integer) Current [generation]($4618071bf1c879cb.md#data-streams-generation "Generation") for the data stream. This number acts as a cumulative count of the stream’s backing indices, including deleted indices.
  11. `status`
  12. (string) [Health status]($f5a22e73b1d30cf1.md "Cluster health API") of the data stream.
  13. This health status is based on the state of the primary and replica shards of the streams backing indices.
  14. Values for `status`
  15. - `green`
  16. All shards are assigned.
  17. `yellow`
  18. All primary shards are assigned, but one or more replica shards are unassigned.
  19. `red`
  20. One or more primary shards are unassigned, so some data is unavailable.
  21. `template`
  22. (string) Name of the index template used to create the data streams backing indices.
  23. The templates index pattern must match the name of this data stream. See [Create an index template for a data stream]($beb5bf4d08d7f40c.md#create-a-data-stream-template "Create an index template for a data stream").
  24. `ilm_policy`
  25. (string) Name of the current ILM lifecycle policy in the streams matching index template. This lifecycle policy is set in the `index.lifecycle.name` setting.
  26. If the template does not include a lifecycle policy, this property is not included in the response.
  27. A data streams backing indices may be assigned different lifecycle policies. To retrieve the lifecycle policy for individual backing indices, use the [get index settings API]($d50b7a3f612cc1d4.md "Get index settings API").

Examples

  1. GET _data_stream/my-data-stream*

The API returns the following response:

  1. {
  2. "data_streams": [
  3. {
  4. "name": "my-data-stream",
  5. "timestamp_field": {
  6. "name": "@timestamp"
  7. },
  8. "indices": [
  9. {
  10. "index_name": ".ds-my-data-stream-000001",
  11. "index_uuid": "xCEhwsp8Tey0-FLNFYVwSg"
  12. },
  13. {
  14. "index_name": ".ds-my-data-stream-000002",
  15. "index_uuid": "PA_JquKGSiKcAKBA8DJ5gw"
  16. }
  17. ],
  18. "generation": 2,
  19. "status": "GREEN",
  20. "template": "my-index-template",
  21. "ilm_policy": "my-lifecycle-policy"
  22. },
  23. {
  24. "name": "my-data-stream_two",
  25. "timestamp_field": {
  26. "name": "@timestamp"
  27. },
  28. "indices": [
  29. {
  30. "index_name": ".ds-my-data-stream_two-000001",
  31. "index_uuid": "3liBu2SYS5axasRt6fUIpA"
  32. }
  33. ],
  34. "generation": 1,
  35. "status": "YELLOW",
  36. "template": "my-index-template",
  37. "ilm_policy": "my-lifecycle-policy"
  38. }
  39. ]
  40. }