Elastic Stack (ELK Stack) data stream API

The data stream API from Elastic Stack (ELK Stack) — 14 operation(s) for data stream.

Operations 21

GET /_data_stream/{name} Get data streams #
PUT /_data_stream/{name} Create a data stream #
DELETE /_data_stream/{name} Delete data streams #
GET /_data_stream/_stats Get data stream stats #
GET /_data_stream/{name}/_stats Get data stream stats #
GET /_data_stream/{name}/_lifecycle Get data stream lifecycles #
PUT /_data_stream/{name}/_lifecycle Update data stream lifecycles #
GET /_data_stream/{name}/_options Get data stream options #
PUT /_data_stream/{name}/_options Update data stream options #
DELETE /_data_stream/{name}/_options Delete data stream options #
POST /{index}/_downsample/{target_index} Downsample an index #
GET /{index}/_lifecycle/explain Get the status for a data stream lifecycle #
GET /_lifecycle/stats Get data stream lifecycle stats #
GET /_data_stream Get data streams #
GET /_data_stream/{name}/_mappings Get data stream mappings #
PUT /_data_stream/{name}/_mappings Update data stream mappings #
GET /_data_stream/{name}/_settings Get data stream settings #
PUT /_data_stream/{name}/_settings Update data stream settings #
POST /_data_stream/_migrate/{name} Convert an index alias to a data stream #
POST /_data_stream/_modify Update data streams #
POST /_data_stream/_promote/{name} Promote a data stream #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/elk-stack-data-stream-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

elk-stack-data-stream-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Elasticsearch Request & Response Specification data stream API
  license:
    name: Apache 2.0
    url: https://github.com/elastic/elasticsearch-specification/blob/main/LICENSE
  version: ''
tags:
- name: data stream
paths:
  /_data_stream/{name}:
    get:
      tags:
      - data stream
      summary: Get data streams
      description: 'Get information about one or more data streams.


        ## Required authorization


        * Index privileges: `view_index_metadata`

        '
      operationId: indices-get-data-stream-1
      parameters:
      - $ref: '#/components/parameters/indices.get_data_stream-name'
      - $ref: '#/components/parameters/indices.get_data_stream-expand_wildcards'
      - $ref: '#/components/parameters/indices.get_data_stream-include_defaults'
      - $ref: '#/components/parameters/indices.get_data_stream-master_timeout'
      - $ref: '#/components/parameters/indices.get_data_stream-verbose'
      responses:
        '200':
          $ref: '#/components/responses/indices.get_data_stream-200'
      x-state: Generally available; Added in 7.9.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - data stream
      summary: Create a data stream
      description: 'You must have a matching index template with data stream enabled.


        ## Required authorization


        * Index privileges: `create_index`

        '
      operationId: indices-create-data-stream
      parameters:
      - in: path
        name: name
        description: 'Name of the data stream, which must meet the following criteria:

          Lowercase only;

          Cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, `,`, `#`, `:`, or a space character;

          Cannot start with `-`, `_`, `+`, or `.ds-`;

          Cannot be `.` or `..`;

          Cannot be longer than 255 bytes. Multi-byte characters count towards this limit faster.'
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.DataStreamName'
        style: simple
      - in: query
        name: master_timeout
        description: 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.
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      - in: query
        name: timeout
        description: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_types.AcknowledgedResponseBase'
      x-state: Generally available; Added in 7.9.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - data stream
      summary: Delete data streams
      description: 'Deletes one or more data streams and their backing indices.


        ## Required authorization


        * Index privileges: `delete_index`

        '
      operationId: indices-delete-data-stream
      parameters:
      - in: path
        name: name
        description: Comma-separated list of data streams to delete. Wildcard (`*`) expressions are supported.
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.DataStreamNames'
        style: simple
      - in: query
        name: master_timeout
        description: 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.
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      - in: query
        name: expand_wildcards
        description: Type of data stream that wildcard patterns can match. Supports comma-separated values,such as `open,hidden`.
        deprecated: false
        schema:
          default: open
          allOf:
          - $ref: '#/components/schemas/_types.ExpandWildcards'
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_types.AcknowledgedResponseBase'
      x-state: Generally available; Added in 7.9.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  /_data_stream/_stats:
    get:
      tags:
      - data stream
      summary: Get data stream stats
      description: 'Get statistics for one or more data streams.


        ## Required authorization


        * Index privileges: `monitor`

        '
      operationId: indices-data-streams-stats
      parameters:
      - $ref: '#/components/parameters/indices.data_streams_stats-expand_wildcards'
      responses:
        '200':
          $ref: '#/components/responses/indices.data_streams_stats-200'
      x-state: Generally available; Added in 7.9.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  /_data_stream/{name}/_stats:
    get:
      tags:
      - data stream
      summary: Get data stream stats
      description: 'Get statistics for one or more data streams.


        ## Required authorization


        * Index privileges: `monitor`

        '
      operationId: indices-data-streams-stats-1
      parameters:
      - $ref: '#/components/parameters/indices.data_streams_stats-name'
      - $ref: '#/components/parameters/indices.data_streams_stats-expand_wildcards'
      responses:
        '200':
          $ref: '#/components/responses/indices.data_streams_stats-200'
      x-state: Generally available; Added in 7.9.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  /_data_stream/{name}/_lifecycle:
    get:
      tags:
      - data stream
      summary: Get data stream lifecycles
      description: Get the data stream lifecycle configuration of one or more data streams.
      externalDocs:
        description: About data stream lifecycle
        url: https://www.elastic.co/docs/manage-data/lifecycle/data-stream
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-get-lifecycle.html
      operationId: indices-get-data-lifecycle
      parameters:
      - in: path
        name: name
        description: 'Comma-separated list of data streams to limit the request.

          Supports wildcards (`*`).

          To target all data streams, omit this parameter or use `*` or `_all`.'
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.DataStreamNames'
        style: simple
      - in: query
        name: expand_wildcards
        description: 'Type of data stream that wildcard patterns can match.

          Supports comma-separated values, such as `open,hidden`.'
        deprecated: false
        schema:
          default: open
          allOf:
          - $ref: '#/components/schemas/_types.ExpandWildcards'
        style: form
      - in: query
        name: include_defaults
        description: If `true`, return all default settings in the response.
        deprecated: false
        schema:
          default: false
          type: boolean
        style: form
      - in: query
        name: master_timeout
        description: 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.
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_streams:
                    type: array
                    items:
                      $ref: '#/components/schemas/indices.get_data_lifecycle.DataStreamWithLifecycle'
                  global_retention:
                    allOf:
                    - $ref: '#/components/schemas/indices.get_data_lifecycle._types.GlobalRetention'
                required:
                - data_streams
                - global_retention
              examples:
                IndicesGetDataLifecycleResponseExample1:
                  description: A successful response from `GET /_data_stream/{name}/_lifecycle?human&pretty`.
                  value: "{\n  \"data_streams\": [\n    {\n      \"name\": \"my-data-stream-1\",\n      \"lifecycle\": {\n        \"enabled\": true,\n        \"data_retention\": \"7d\"\n      }\n    },\n    {\n      \"name\": \"my-data-stream-2\",\n      \"lifecycle\": {\n        \"enabled\": true,\n        \"data_retention\": \"7d\"\n      }\n    }\n  ]\n}"
      x-state: Generally available; Added in 8.11.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - data stream
      summary: Update data stream lifecycles
      description: Update the data stream lifecycle of the specified data streams.
      externalDocs:
        description: About data stream lifecycle
        url: https://www.elastic.co/docs/manage-data/lifecycle/data-stream
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-put-lifecycle.html
      operationId: indices-put-data-lifecycle
      parameters:
      - in: path
        name: name
        description: 'Comma-separated list of data streams used to limit the request.

          Supports wildcards (`*`).

          To target all data streams use `*` or `_all`.'
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.DataStreamNames'
        style: simple
      - in: query
        name: expand_wildcards
        description: 'Type of data stream that wildcard patterns can match.

          Supports comma-separated values, such as `open,hidden`.'
        deprecated: false
        schema:
          default: open
          allOf:
          - $ref: '#/components/schemas/_types.ExpandWildcards'
        style: form
      - in: query
        name: master_timeout
        description: '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.'
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      - in: query
        name: timeout
        description: 'Period to wait for a response.

          If no response is received before the timeout expires, the request fails and returns an error.'
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data_retention:
                  description: 'If defined, every document added to this data stream will be stored at least for this time frame.

                    Any time after this duration the document could be deleted.

                    When empty, every document in this data stream will be stored indefinitely.'
                  allOf:
                  - $ref: '#/components/schemas/_types.Duration'
                downsampling:
                  description: The downsampling configuration to execute for the managed backing index after rollover.
                  type: array
                  items:
                    $ref: '#/components/schemas/indices._types.DownsamplingRound'
                downsampling_method:
                  description: 'The method used to downsample the data. There are two options `aggregate` and `last_value`. It requires

                    `downsampling` to be defined. Defaults to `aggregate`.'
                  allOf:
                  - $ref: '#/components/schemas/indices._types.SamplingMethod'
                enabled:
                  description: 'If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle

                    that''s disabled (enabled: `false`) will have no effect on the data stream.'
                  default: true
                  type: boolean
            examples:
              IndicesPutDataLifecycleRequestExample1:
                summary: Set the data stream lifecycle retention
                value: "{\n  \"data_retention\": \"7d\"\n}"
              IndicesPutDataLifecycleRequestExample2:
                summary: Set the data stream lifecycle downsampling
                description: This example configures two downsampling rounds.
                value: "{\n    \"downsampling\": [\n      {\n        \"after\": \"1d\",\n        \"fixed_interval\": \"10m\"\n      },\n      {\n        \"after\": \"7d\",\n        \"fixed_interval\": \"1d\"\n      }\n    ]\n}"
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_types.AcknowledgedResponseBase'
              examples:
                IndicesPutDataLifecycleResponseExample1:
                  description: A successful response for configuring a data stream lifecycle.
                  value: "{\n  \"acknowledged\": true\n}"
      x-state: Generally available; Added in 8.11.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  /_data_stream/{name}/_options:
    get:
      tags:
      - data stream
      summary: Get data stream options
      description: Get the data stream options configuration of one or more data streams.
      operationId: indices-get-data-stream-options
      parameters:
      - in: path
        name: name
        description: 'Comma-separated list of data streams to limit the request.

          Supports wildcards (`*`).

          To target all data streams, omit this parameter or use `*` or `_all`.'
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.DataStreamNames'
        style: simple
      - in: query
        name: expand_wildcards
        description: 'Type of data stream that wildcard patterns can match.

          Supports comma-separated values, such as `open,hidden`.'
        deprecated: false
        schema:
          default: open
          allOf:
          - $ref: '#/components/schemas/_types.ExpandWildcards'
        style: form
      - in: query
        name: master_timeout
        description: 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.
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_streams:
                    type: array
                    items:
                      $ref: '#/components/schemas/indices.get_data_stream_options.DataStreamWithOptions'
                required:
                - data_streams
      x-state: Generally available; Added in 8.19.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - data stream
      summary: Update data stream options
      description: Update the data stream options of the specified data streams.
      operationId: indices-put-data-stream-options
      parameters:
      - in: path
        name: name
        description: 'Comma-separated list of data streams used to limit the request.

          Supports wildcards (`*`).

          To target all data streams use `*` or `_all`.'
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.DataStreamNames'
        style: simple
      - in: query
        name: expand_wildcards
        description: 'Type of data stream that wildcard patterns can match.

          Supports comma-separated values, such as `open,hidden`.'
        deprecated: false
        schema:
          default: open
          allOf:
          - $ref: '#/components/schemas/_types.ExpandWildcards'
        style: form
      - in: query
        name: master_timeout
        description: '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.'
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      - in: query
        name: timeout
        description: 'Period to wait for a response.

          If no response is received before the timeout expires, the request fails and returns an error.'
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                failure_store:
                  description: If defined, it will update the failure store configuration of every data stream resolved by the name expression.
                  allOf:
                  - $ref: '#/components/schemas/indices._types.DataStreamFailureStore'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_types.AcknowledgedResponseBase'
      x-state: Generally available; Added in 8.19.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - data stream
      summary: Delete data stream options
      description: Removes the data stream options from a data stream.
      operationId: indices-delete-data-stream-options
      parameters:
      - in: path
        name: name
        description: 'A comma-separated list of data streams of which the data stream options will be deleted.

          Use `*` to get all data streams'
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.DataStreamNames'
        style: simple
      - in: query
        name: expand_wildcards
        description: Whether wildcard expressions should get expanded to open or closed indices
        deprecated: false
        schema:
          default: open
          allOf:
          - $ref: '#/components/schemas/_types.ExpandWildcards'
        style: form
      - in: query
        name: master_timeout
        description: The period to wait for a connection to the master node.
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      - in: query
        name: timeout
        description: The period to wait for a response.
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_types.AcknowledgedResponseBase'
              examples:
                IndicesDeleteDataStreamOptionsResponseExample1:
                  description: A successful response for deleting data stream options.
                  value: "{\n  \"acknowledged\": true\n}"
      x-state: Generally available; Added in 8.19.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  /{index}/_downsample/{target_index}:
    post:
      tags:
      - data stream
      summary: Downsample an index
      description: 'Downsamples a time series (TSDS) index and reduces its size by keeping the last value or by pre-aggregating metrics:


        - When running in `aggregate` mode, it pre-calculates and stores statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`)

        for each metric field grouped by a configured time interval and their dimensions.

        - When running in `last_value` mode, it keeps the last value for each metric in the configured interval and their dimensions.


        For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.

        All documents within an hour interval are summarized and stored as a single document in the downsample index.


        NOTE: Only indices in a time series data stream are supported.

        Neither field nor document level security can be defined on the source index.

        The source index must be read-only (`index.blocks.write: true`).'
      operationId: indices-downsample
      parameters:
      - in: path
        name: index
        description: Name of the time series index to downsample.
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.IndexName'
        style: simple
      - in: path
        name: target_index
        description: Name of the index to create.
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.IndexName'
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/indices._types.DownsampleConfig'
            examples:
              DownsampleRequestExample1:
                value: "{\n  \"fixed_interval\": \"1d\"\n}"
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
      x-state: Generally available; Added in 8.7.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  /{index}/_lifecycle/explain:
    get:
      tags:
      - data stream
      summary: Get the status for a data stream lifecycle
      description: Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.
      externalDocs:
        description: About data stream lifecycle
        url: https://www.elastic.co/docs/manage-data/lifecycle/data-stream
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-explain-lifecycle.html
      operationId: indices-explain-data-lifecycle
      parameters:
      - in: path
        name: index
        description: Comma-separated list of index names to explain
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.Indices'
        style: simple
      - in: query
        name: include_defaults
        description: Indicates if the API should return the default values the system uses for the index's lifecycle
        deprecated: false
        schema:
          default: false
          type: boolean
        style: form
      - in: query
        name: master_timeout
        description: The period to wait for a connection to the master node.
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  indices:
                    type: object
                    additionalProperties:
                      $ref: '#/components/schemas/indices.explain_data_lifecycle.DataStreamLifecycleExplain'
                required:
                - indices
              examples:
                IndicesExplainDataLifecycleResponseExample1:
                  summary: Successful response
                  description: 'A successful response from `GET .ds-metrics-2023.03.22-000001/_lifecycle/explain`, which retrieves  the lifecycle status for a data stream backing index. If the index is managed by a data stream lifecycle, the API will show the `managed_by_lifecycle` field set to `true` and the rest of the response will contain information about the lifecycle execution status for this index.

                    '
                  value: "{\n  \"indices\": {\n    \".ds-metrics-2023.03.22-000001\": {\n      \"index\" : \".ds-metrics-2023.03.22-000001\",\n      \"managed_by_lifecycle\" : true,\n      \"index_creation_date_millis\" : 1679475563571,\n      \"time_since_index_creation\" : \"843ms\",\n      \"rollover_date_millis\" : 1679475564293,\n      \"time_since_rollover\" : \"121ms\",\n      \"lifecycle\" : { },\n      \"generation_time\" : \"121ms\"\n  }\n}"
                IndicesExplainDataLifecycleResponseExample2:
                  summary: Successful response with error messages
                  description: The API reports any errors related to the lifecycle execution for the target index.
                  value: "{\n  \"indices\": {\n    \".ds-metrics-2023.03.22-000001\": {\n      \"index\" : \".ds-metrics-2023.03.22-000001\",\n      \"managed_by_lifecycle\" : true,\n      \"index_creation_date_millis\" : 1679475563571,\n      \"time_since_index_creation\" : \"843ms\",\n      \"lifecycle\" : {\n        \"enabled\": true\n      },\n      \"error\": \"{\\\"type\\\":\\\"validation_exception\\\",\\\"reason\\\":\\\"Validation Failed: 1: this action would add [2] shards, but this cluster\ncurrently has [4]/[3] maximum normal shards open;\\\"}\"\n  }\n}"
      x-state: Generally available; Added in 8.11.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  /_lifecycle/stats:
    get:
      tags:
      - data stream
      summary: Get data stream lifecycle stats
      description: 'Get statistics about the data streams that are managed by a data stream lifecycle.


        ## Required authorization


        * Cluster privileges: `monitor`

        '
      externalDocs:
        description: About data stream lifecycle
        url: https://www.elastic.co/docs/manage-data/lifecycle/data-stream
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams-get-lifecycle-stats.html
      operationId: indices-get-data-lifecycle-stats
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_stream_count:
                    description: The count of data streams currently being managed by the data stream lifecycle.
                    type: number
                  data_streams:
                    description: Information about the data streams that are managed by the data stream lifecycle.
                    type: array
                    items:
                      $ref: '#/components/schemas/indices.get_data_lifecycle_stats.DataStreamStats'
                  last_run_duration_in_millis:
                    description: The duration of the last data stream lifecycle execution.
                    allOf:
                    - $ref: '#/components/schemas/_types.DurationValueUnitMillis'
                  time_between_starts_in_millis:
                    description: 'The time that passed between the start of the last two data stream lifecycle executions.

                      This value should amount approximately to `data_streams.lifecycle.poll_interval`.'
                    allOf:
                    - $ref: '#/components/schemas/_types.DurationValueUnitMillis'
                required:
                - data_stream_count
                - data_streams
              examples:
                IndicesGetDataLifecycleStatsResponseExample1:
                  description: A successful response for `GET _lifecycle/stats?human&pretty`
                  value: "{\n  \"last_run_duration_in_millis\": 2,\n  \"last_run_duration\": \"2ms\",\n  \"time_between_starts_in_millis\": 9998,\n  \"time_between_starts\": \"9.99s\",\n  \"data_streams_count\": 2,\n  \"data_streams\": [\n    {\n      \"name\": \"my-data-stream\",\n      \"backing_indices_in_total\": 2,\n      \"backing_indices_in_error\": 0\n    },\n    {\n      \"name\": \"my-other-stream\",\n      \"backing_indices_in_total\": 2,\n      \"backing_indices_in_error\": 1\n    }\n  ]\n}"
      x-state: Generally available; Added in 8.12.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  /_data_stream:
    get:
      tags:
      - data stream
      summary: Get data streams
      description: 'Get information about one or more data streams.


        ## Required authorization


        * Index privileges: `view_index_metadata`

        '
      operationId: indices-get-data-stream
      parameters:
      - $ref: '#/components/parameters/indices.get_data_stream-expand_wildcards'
      - $ref: '#/components/parameters/indices.get_data_stream-include_defaults'
      - $ref: '#/components/parameters/indices.get_data_stream-master_timeout'
      - $ref: '#/components/parameters/indices.get_data_stream-verbose'
      responses:
        '200':
          $ref: '#/components/responses/indices.get_data_stream-200'
      x-state: Generally available; Added in 7.9.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  /_data_stream/{name}/_mappings:
    get:
      tags:
      - data stream
      summary: Get data stream mappings
      description: 'Get mapping information for one or more data streams.


        ## Required authorization


        * Index privileges: `view_index_metadata`

        '
      operationId: indices-get-data-stream-mappings
      parameters:
      - in: path
        name: name
        description: A comma-separated list of data streams or data stream patterns. Supports wildcards (`*`).
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.Indices'
        style: simple
      - in: query
        name: master_timeout
        description: 'The 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.'
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_streams:
                    type: array
                    items:
                      $ref: '#/components/schemas/indices.get_data_stream_mappings.DataStreamMappings'
                required:
                - data_streams
              examples:
                IndicesGetDataStreamMappingsResponseExample1:
                  summary: Get data stream settings on a data stream
                  description: 'This is a response to `GET /_data_stream/my-data-stream/_settings` where my-data-stream that has two settings set. The `effective_settings` field shows additional settings that are pulled from its template.

                    '
                  value: "{\n  \"data_streams\": [\n    {\n      \"name\": \"my-data-stream\",\n      \"mappings\": {\n        \"properties\": {\n          \"field1\": {\n            \"type\": \"ip\"\n          },\n          \"field3\": {\n            \"type\": \"text\"\n          }\n        }\n      },\n      \"effective_mappings\": {\n        \"properties\": {\n          \"field1\": {\n            \"type\": \"ip\"\n     

# --- truncated at 32 KB (613 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elk-stack/refs/heads/main/openapi/elk-stack-data-stream-api-openapi.yml