---
type: api
title: Get cluster-wide settings
description: By default, it returns only settings that have been explicitly defined.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-cluster-get-settings
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-cluster-get-settings
products:
  - Elasticsearch
---

# Get cluster-wide settings

## Paths

- `GET` `/_cluster/settings`

## Description

By default, it returns only settings that have been explicitly defined.

[Read the reference documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.19/settings.html)

## Required authorization

- Cluster privileges: `monitor`

## 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

- `flat_settings` (boolean · default: false) — optional
  If `true`, returns settings in flat format.
- `include_defaults` (boolean · default: false) — optional
  If `true`, also returns default values for all other cluster settings, reflecting the values
in the `elasticsearch.yml` file of one of the nodes in the cluster. If the nodes in your
cluster do not all have the same values in their `elasticsearch.yml` config files then the
values returned by this API may vary from invocation to invocation and may not reflect the
values that Elasticsearch uses in all situations. Use the `GET _nodes/settings` API to
fetch the settings for each individual node in your cluster.
- `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.
- `timeout` (string · default: 30s) — optional
  Period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error.

## Response

`application/json`

- `persistent` (map string to object)
  The settings that persist after the cluster restarts.
- `transient` (map string to object)
  The settings that do not persist after the cluster restarts.
- `defaults` (map string to object)
  The default setting values.
## Code examples

#### Console

```console
GET /_cluster/settings?filter_path=persistent.cluster.remote
```

#### JavaScript

```javascript
const response = await client.cluster.getSettings({
  filter_path: "persistent.cluster.remote",
});
```

#### Python

```python
resp = client.cluster.get_settings(
    filter_path="persistent.cluster.remote",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_cluster/settings?filter_path=persistent.cluster.remote" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java

```

#### C#

```c#
var response = await client.Cluster.GetSettingsAsync();
```

#### PHP

```php
$resp = $client->cluster()->getSettings([
    "filter_path" => "persistent.cluster.remote",
]);
```

#### Ruby

```ruby
response = client.cluster.get_settings(
  filter_path: "persistent.cluster.remote"
)
```

