Clear the API key cache
Generally available; Added in 7.10.0
Evict a subset of all entries from the API key cache. The cache is also automatically cleared on state changes of the security index.
highlight#highlightFromAnchor" href="#topic-required-authorization"> Required authorization
- Cluster privileges:
manage_security
POST
/_security/api_key/{ids}/_clear_cache
dropdown#toggle click@window->dropdown#hide touchend@window->dropdown#hide"
data-dropdown-target="button"
data-scrollable="false"
data-headings="false"
aria-expanded="false"
aria-haspopup="true"
role="menu"
tabindex="0">
Console
POST /_security/api_key/yVGMr3QByxdh1MSaicYx/_clear_cache
resp = client.security.clear_api_key_cache(
ids="yVGMr3QByxdh1MSaicYx",
)
const response = await client.security.clearApiKeyCache({
ids: "yVGMr3QByxdh1MSaicYx",
});
response = client.security.clear_api_key_cache(
ids: "yVGMr3QByxdh1MSaicYx"
)
$resp = $client->security()->clearApiKeyCache([
"ids" => "yVGMr3QByxdh1MSaicYx",
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/api_key/yVGMr3QByxdh1MSaicYx/_clear_cache"
client.security().clearApiKeyCache(c -> c
.ids("yVGMr3QByxdh1MSaicYx")
);