---
type: api
title: Get security index settings
description: Get the user-configurable settings for the security internal index (`.security` and associated indices).
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/operation/operation-security-get-settings
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/operation/operation-security-get-settings
products:
  - Elasticsearch
---

# Get security index settings

Availability:

## Paths

- `GET` `/_security/settings`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/authentication#bearerauth)

## Description

Get the user-configurable settings for the security internal index (`.security` and associated indices).
Only a subset of the index settings — those that are user-configurable—will be shown.
This includes:

* `index.auto_expand_replicas`
* `index.number_of_replicas`

## Required authorization

* Cluster privileges: `read_security`

## Query String Parameters

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

- `security` ({} SecuritySettings)
  Settings for the index used for most security configuration, including native realm users and roles configured with the API.
  - `index` (IndexSettings)
- `security-profile` ({} SecuritySettings)
  Settings for the index used to store profile information.
  - `index` (IndexSettings)
- `security-tokens` ({} SecuritySettings)
  Settings for the index used to store tokens.
  - `index` (IndexSettings)
## Code Examples

#### Console

```console
GET /_security/settings
```

#### JavaScript

```javascript
const response = await client.security.getSettings();
```

#### Python

```python
resp = client.security.get_settings()
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_security/settings" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.security().getSettings(g -> g);
```

#### C#

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

#### PHP

```php
$resp = $client->security()->getSettings();
```

#### Ruby

```ruby
response = client.security.get_settings
```

