Clear the privileges cache Generally available; Added in 7.9.0

POST /_security/privilege/{application}/_clear_cache

Evict privileges from the native application privilege cache. The cache is also automatically cleared for applications that have their privileges updated.

highlight#highlightFromAnchor" href="#topic-required-authorization"> Required authorization

  • Cluster privileges: manage_security

Path parameters

  • application string Required

    A comma-separated list of applications. To clear all applications, use an asterism (*). It does not support other wildcard patterns.

Responses

POST /_security/privilege/myapp/_clear_cache
resp = client.security.clear_cached_privileges(
    application="myapp",
)
const response = await client.security.clearCachedPrivileges({
  application: "myapp",
});
response = client.security.clear_cached_privileges(
  application: "myapp"
)
$resp = $client->security()->clearCachedPrivileges([
    "application" => "myapp",
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/privilege/myapp/_clear_cache"
client.security().clearCachedPrivileges(c -> c
    .application("myapp")
);