Update security index settings

PUT /_security/settings

Update the user-configurable settings for the security internal index (.security and associated indices). Only a subset of settings are allowed to be modified. This includes index.auto_expand_replicas and index.number_of_replicas.

NOTE: If index.auto_expand_replicas is set, index.number_of_replicas will be ignored during updates.

If a specific index is not in use on the system and settings are provided for it, the request will be rejected. This API does not yet support configuring the settings for indices before they are in use.

Query parameters

  • master_timeout string

    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.

    Values are -1 or 0.

  • timeout string

    The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

    Values are -1 or 0.

application/json

Body Required

  • security object
    Hide security attribute Show security attribute object
  • security-profile object
    Hide security-profile attribute Show security-profile attribute object
  • security-tokens object
    Hide security-tokens attribute Show security-tokens attribute object

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledged boolean Required
PUT /_security/settings
PUT /_security/settings
{
    "security": {
        "index.auto_expand_replicas": "0-all"
    },
    "security-tokens": {
        "index.auto_expand_replicas": "0-all"
    },
    "security-profile": {
        "index.auto_expand_replicas": "0-all"
    }
}
curl \
 --request PUT 'http://api.example.com/_security/settings' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '"{\n    \"security\": {\n        \"index.auto_expand_replicas\": \"0-all\"\n    },\n    \"security-tokens\": {\n        \"index.auto_expand_replicas\": \"0-all\"\n    },\n    \"security-profile\": {\n        \"index.auto_expand_replicas\": \"0-all\"\n    }\n}"'
Request example
Run `PUT /_security/settings` to modify the security settings.
{
    "security": {
        "index.auto_expand_replicas": "0-all"
    },
    "security-tokens": {
        "index.auto_expand_replicas": "0-all"
    },
    "security-profile": {
        "index.auto_expand_replicas": "0-all"
    }
}