clear-roles-cache.asciidoc 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. [role="xpack"]
  2. [[security-api-clear-role-cache]]
  3. === Clear roles cache API
  4. ++++
  5. <titleabbrev>Clear roles cache</titleabbrev>
  6. ++++
  7. Evicts roles from the native role cache.
  8. [[security-api-clear-role-cache-request]]
  9. ==== {api-request-title}
  10. `POST /_security/role/<name>/_clear_cache`
  11. [[security-api-clear-role-cache-prereqs]]
  12. ==== {api-prereq-title}
  13. * To use this API, you must have at least the `manage_security` cluster
  14. privilege.
  15. [[security-api-clear-role-cache-desc]]
  16. ==== {api-description-title}
  17. For more information about the native realm, see
  18. {stack-ov}/realms.html[Realms] and <<configuring-native-realm>>.
  19. [[security-api-clear-role-cache-path-params]]
  20. ==== {api-path-parms-title}
  21. `name`::
  22. (string) The name of the role.
  23. [[security-api-clear-role-cache-example]]
  24. ==== {api-examples-title}
  25. The clear roles cache API evicts roles from the native role cache. For example,
  26. to clear the cache for `my_admin_role`:
  27. [source,js]
  28. --------------------------------------------------
  29. POST /_security/role/my_admin_role/_clear_cache
  30. --------------------------------------------------
  31. // CONSOLE