
--
:api: clear-service-account-token-cache
:request: ClearServiceAccountTokenCacheRequest
:response: ClearSecurityCacheResponse
--
[role="xpack"]
[id="{upid}-{api}"]
=== Clear Service Account Token Cache API

[id="{upid}-{api}-request"]
==== Clear Service Account Token Cache Request

A +{request}+ supports clearing service account token cache for the given
namespace, service name and token names.
It can also clear the entire cache if a `*` is specified for the token name.

["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
<1> Namespace of the service account
<2> Service name of the service account
<3> Name(s) for the service account token to be evicted from the cache

include::../execution.asciidoc[]

[id="{upid}-{api}-response"]
==== Clear Service Account Token Cache Response

The returned +{response}+ allows to retrieve information about where the cache was cleared.

["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> the list of nodes that the cache was cleared on
