mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 23:57:20 -04:00
**Problem:** For historical reasons, source files for the Elasticsearch Guide's security, watcher, and Logstash API docs are housed in the `x-pack/docs` directory. This can confuse new contributors who expect Elasticsearch Guide docs to be located in `docs/reference`. **Solution:** - Move the security, watcher, and Logstash API doc source files to the `docs/reference` directory - Update doc snippet tests to use security Rel: https://github.com/elastic/platform-docs-team/issues/208
59 lines
No EOL
1.6 KiB
Text
59 lines
No EOL
1.6 KiB
Text
[role="xpack"]
|
|
[[security-api-clear-api-key-cache]]
|
|
=== Clear API key cache API
|
|
++++
|
|
<titleabbrev>Clear API key cache</titleabbrev>
|
|
++++
|
|
|
|
Evicts a subset of all entries from the API key cache.
|
|
The cache is also automatically cleared on state changes of the security index.
|
|
|
|
[[security-api-clear-api-key-cache-request]]
|
|
==== {api-request-title}
|
|
|
|
`POST /_security/api_key/<ids>/_clear_cache`
|
|
|
|
[[security-api-clear-api-key-cache-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* To use this API, you must have at least the `manage_security` cluster
|
|
privilege.
|
|
|
|
[[security-api-clear-api-key-cache-desc]]
|
|
==== {api-description-title}
|
|
|
|
For more information about API keys, see <<security-api-create-api-key>>,
|
|
<<security-api-get-api-key>>, and <<security-api-invalidate-api-key>>.
|
|
|
|
[[security-api-clear-api-key-cache-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<ids>`::
|
|
(Required, string)
|
|
Comma-separated list of API key IDs to evict from the API key cache. To evict
|
|
all API keys, use `*`. Does not support other wildcard patterns.
|
|
|
|
[[security-api-clear-api-key-cache-example]]
|
|
==== {api-examples-title}
|
|
|
|
The clear API key cache API evicts entries from the API key cache.
|
|
For example, to clear the entry of API key with ID `yVGMr3QByxdh1MSaicYx`.
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
POST /_security/api_key/yVGMr3QByxdh1MSaicYx/_clear_cache
|
|
--------------------------------------------------
|
|
|
|
Specify multiple API keys as a comma-separated list.
|
|
|
|
[source,console]
|
|
----
|
|
POST /_security/api_key/yVGMr3QByxdh1MSaicYx,YoiMaqREw0YVpjn40iMg/_clear_cache
|
|
----
|
|
|
|
To clear all entries from the API key cache, use `*`.
|
|
|
|
[source,console]
|
|
----
|
|
POST /_security/api_key/*/_clear_cache
|
|
---- |