---
type: api
title: Get data stream settings
description: Get setting information for one or more data streams.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch-serverless/operation/operation-indices-get-data-stream-settings
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch-serverless/operation/operation-indices-get-data-stream-settings
products:
  - Elasticsearch Serverless
---

# Get data stream settings

Availability:

## Paths

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

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch-serverless/authentication#apikeyauth)

#### Path Parameters

- `name` (union IndexName | [] IndexName)
  A comma-separated list of data streams or data stream patterns. Supports wildcards (`*`).

## Description

Get setting information for one or more data streams.

## Required authorization

* Index privileges: `view_index_metadata`

## Query String Parameters

- `master_timeout` (string Duration · default: 30s)
  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.

## Response

`application/json`

- `data_streams` ([] DataStreamSettings)
  - `name` (string)
    The name of the data stream.
  - `settings` (IndexSettings)
    The settings specific to this data stream
  - `effective_settings` (IndexSettings)
    The settings specific to this data stream merged with the settings from its template. These `effective_settings`
are the settings that will be used when a new index is created for this data stream.
## Code Examples

#### Console

```console
GET /_data_stream/my-data-stream/_settings
```

#### JavaScript

```javascript
const response = await client.indices.getDataStreamSettings({
  name: "my-data-stream",
});
```

#### Python

```python
resp = client.indices.get_data_stream_settings(
    name="my-data-stream",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_data_stream/my-data-stream/_settings" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.indices().getDataStreamSettings(g -> g
    .name("my-data-stream")
);
```

#### C#

```c#
var response = await client.Indices.GetDataStreamSettingsAsync(name: new[] { "my-data-stream" });
```

#### PHP

```php
$resp = $client->indices()->getDataStreamSettings([
    "name" => "my-data-stream",
]);
```

#### Ruby

```ruby
response = client.indices.get_data_stream_settings(
  name: "my-data-stream"
)
```

## Response Examples

#### Get data stream settings on a data stream

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.

```json
{
  "data_streams": [
    {
      "name": "my-data-stream",
      "settings": {
        "index": {
          "lifecycle": {
            "name": "new-test-policy"
          },
          "number_of_shards": "11"
        }
      },
      "effective_settings": {
        "index": {
          "lifecycle": {
            "name": "new-test-policy"
          },
          "mode": "standard",
          "number_of_shards": "11",
          "number_of_replicas": "0"
        }
      }
    }
  ]
}
```

