Query parameters

  • 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.

  • timeoutstring

    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

BodyRequired

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
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"
    }
}
resp = client.security.update_settings(
    security={
        "index.auto_expand_replicas": "0-all"
    },
    security-tokens={
        "index.auto_expand_replicas": "0-all"
    },
    security-profile={
        "index.auto_expand_replicas": "0-all"
    },
)
const response = await client.security.updateSettings({
  security: {
    "index.auto_expand_replicas": "0-all",
  },
  "security-tokens": {
    "index.auto_expand_replicas": "0-all",
  },
  "security-profile": {
    "index.auto_expand_replicas": "0-all",
  },
});
response = client.security.update_settings(
  body: {
    "security": {
      "index.auto_expand_replicas": "0-all"
    },
    "security-tokens": {
      "index.auto_expand_replicas": "0-all"
    },
    "security-profile": {
      "index.auto_expand_replicas": "0-all"
    }
  }
)
$resp = $client->security()->updateSettings([
    "body" => [
        "security" => [
            "index.auto_expand_replicas" => "0-all",
        ],
        "security-tokens" => [
            "index.auto_expand_replicas" => "0-all",
        ],
        "security-profile" => [
            "index.auto_expand_replicas" => "0-all",
        ],
    ],
]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"security":{"index.auto_expand_replicas":"0-all"},"security-tokens":{"index.auto_expand_replicas":"0-all"},"security-profile":{"index.auto_expand_replicas":"0-all"}}' "$ELASTICSEARCH_URL/_security/settings"
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"
    }
}