Clear service account token caches
Evict a subset of all entries from the service account token caches.
Two separate caches exist for service account tokens: one cache for tokens backed by the service_tokens
file, and another for tokens backed by the .security
index.
This API clears matching entries from both caches.
The cache for service account tokens backed by the .security
index is cleared automatically on state changes of the security index.
The cache for tokens backed by the service_tokens
file is cleared automatically on file changes.
Path parameters
-
namespace
string Required The namespace, which is a top-level grouping of service accounts.
-
service
string Required The name of the service, which must be unique within its namespace.
-
name
string | array[string] Required A comma-separated list of token names to evict from the service account token caches. Use a wildcard (
*
) to evict all tokens that belong to a service account. It does not support other wildcard patterns.
curl \
--request POST 'http://api.example.com/_security/service/{namespace}/{service}/credential/token/{name}/_clear_cache' \
--header "Authorization: $API_KEY"
{
"_nodes": {
"failures": [
{
"type": "string",
"reason": "string",
"stack_trace": "string",
"caused_by": {},
"root_cause": [
{}
],
"suppressed": [
{}
]
}
],
"total": 42.0,
"successful": 42.0,
"failed": 42.0
},
"cluster_name": "string",
"nodes": {
"additionalProperty1": {
"name": "string"
},
"additionalProperty2": {
"name": "string"
}
}
}