Clear service account token caches

Auth

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.

Read the reference documentation

Required authorization

Cluster privileges manage_security

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 union string | 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.

Response

application/json
_nodes object required
failures object[]
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as failures in _nodes
root_cause object[]
Same fields as failures in _nodes
suppressed object[]
Same fields as failures in _nodes
total number required

Total number of nodes selected by the request.

successful number required

Number of nodes that responded successfully to the request.

failed number required

Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response.

cluster_name string required
nodes map string to object required
<string> object
name string required