2018-08-17 12:18:08 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[[security-api-clear-role-cache]]
|
|
|
|
=== Clear roles cache API
|
2018-12-20 13:23:28 -05:00
|
|
|
++++
|
|
|
|
<titleabbrev>Clear roles cache</titleabbrev>
|
|
|
|
++++
|
2018-08-17 12:18:08 -04:00
|
|
|
|
|
|
|
Evicts roles from the native role cache.
|
|
|
|
|
2019-08-02 13:56:05 -04:00
|
|
|
[[security-api-clear-role-cache-request]]
|
|
|
|
==== {api-request-title}
|
2018-08-17 12:18:08 -04:00
|
|
|
|
2018-12-11 04:13:10 -05:00
|
|
|
`POST /_security/role/<name>/_clear_cache`
|
2018-08-17 12:18:08 -04:00
|
|
|
|
2019-08-02 13:56:05 -04:00
|
|
|
[[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}
|
2018-08-17 12:18:08 -04:00
|
|
|
|
|
|
|
For more information about the native realm, see
|
|
|
|
{stack-ov}/realms.html[Realms] and <<configuring-native-realm>>.
|
|
|
|
|
2019-08-02 13:56:05 -04:00
|
|
|
[[security-api-clear-role-cache-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
2018-08-17 12:18:08 -04:00
|
|
|
|
|
|
|
`name`::
|
|
|
|
(string) The name of the role.
|
|
|
|
|
2019-08-02 13:56:05 -04:00
|
|
|
[[security-api-clear-role-cache-example]]
|
|
|
|
==== {api-examples-title}
|
2018-08-17 12:18:08 -04:00
|
|
|
|
|
|
|
The clear roles cache API evicts roles from the native role cache. For example,
|
|
|
|
to clear the cache for `my_admin_role`:
|
|
|
|
|
2019-09-05 14:12:39 -04:00
|
|
|
[source,console]
|
2018-08-17 12:18:08 -04:00
|
|
|
--------------------------------------------------
|
2018-12-11 04:13:10 -05:00
|
|
|
POST /_security/role/my_admin_role/_clear_cache
|
2018-08-17 12:18:08 -04:00
|
|
|
--------------------------------------------------
|