---
type: api
title: Get data stream options
description: Get the data stream options configuration of one or more data streams.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-indices-get-data-stream-options
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-indices-get-data-stream-options
products:
  - Elasticsearch
---

# Get data stream options

Availability: Generally available since 8.19

## Paths

- `GET` `/_data_stream/{name}/_options`

#### Path parameters

- `name` (union string | string[]) — required
  Comma-separated list of data streams to limit the request.
Supports wildcards (`*`).
To target all data streams, omit this parameter or use `*` or `_all`.

## Description

Get the data stream options configuration of one or more data streams.

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs support key-based authentication.
  You must create an API key and use the encoded value in the request header.
  For example:
  
  
  ```
  curl -X GET "${ES_URL}/_cat/indices?v=true" \
    -H "Authorization: ApiKey ${API_KEY}"
  ```
  
  To get API keys, use the `/_security/api_key` APIs.
- Basic: `Authorization: Basic <credentials>`
- Bearer: `Authorization: Bearer <token>`
  Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.
  For examples, refer to [Token-based authentication services](https://www.elastic.co/guide/en/elasticsearch/reference/current/token-authentication-services.html)

## Query string parameters

- `expand_wildcards` (string · default: open) — optional
  Type of data stream that wildcard patterns can match.
Supports comma-separated values, such as `open,hidden`.
Valid values are: `all`, `open`, `closed`, `hidden`, `none`.

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 with `open`, `closed`, or `both`.
  - `none`: Wildcard expressions are not accepted.
  Values: `all`, `open`, `closed`, `hidden`, `none`
- `master_timeout` (string · default: 30s) — optional
  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.

## Response

`application/json`

- `data_streams` (object[])
  - `name` (string)
  - `options` (object)
    - `failure_store` (object)
      If defined, it specifies configuration for the failure store of this data stream.
      - `enabled` (boolean · default: true)
        If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store
that's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will
not remove any existing data from the failure store.
      - `lifecycle` (object)
        If defined, it specifies the lifecycle configuration for the failure store of this data stream.
        - `data_retention` (string)
          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.
        - `enabled` (boolean · default: true)
          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.
## Code examples

#### Console

```console
GET /_data_stream/NAME/_options
```

#### curl

```curl
curl -X GET "${ELASTICSEARCH_URL}/_data_stream/${NAME}/_options" \
  -H "Authorization: ApiKey ${API_KEY}"
```

