mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -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
58 lines
1.4 KiB
Text
58 lines
1.4 KiB
Text
[role="xpack"]
|
|
[[security-api-clear-role-cache]]
|
|
=== Clear roles cache API
|
|
++++
|
|
<titleabbrev>Clear roles cache</titleabbrev>
|
|
++++
|
|
|
|
Evicts roles from the native role cache.
|
|
|
|
[[security-api-clear-role-cache-request]]
|
|
==== {api-request-title}
|
|
|
|
`POST /_security/role/<roles>/_clear_cache`
|
|
|
|
[[security-api-clear-role-cache-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* To use this API, you must have at least the `manage_security` cluster
|
|
privilege.
|
|
|
|
[[security-api-clear-role-cache-desc]]
|
|
==== {api-description-title}
|
|
|
|
For more information about the native realm, see
|
|
<<realms>> and <<native-realm>>.
|
|
|
|
[[security-api-clear-role-cache-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<roles>`::
|
|
(Required, string)
|
|
Comma-separated list of roles to evict from the role cache. To evict all
|
|
roles, use `*`. Does not support other wildcard patterns.
|
|
|
|
[[security-api-clear-role-cache-example]]
|
|
==== {api-examples-title}
|
|
|
|
The clear roles cache API evicts roles from the native role cache. For example,
|
|
to clear the cache for `my_admin_role`:
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
POST /_security/role/my_admin_role/_clear_cache
|
|
--------------------------------------------------
|
|
|
|
Specify multiple roles as a comma-separated list.
|
|
|
|
[source,console]
|
|
----
|
|
POST /_security/role/my_admin_role,my_test_role/_clear_cache
|
|
----
|
|
|
|
To clear all roles from the cache, use `*`.
|
|
|
|
[source,console]
|
|
----
|
|
POST /_security/role/*/_clear_cache
|
|
----
|