clear-roles-cache.asciidoc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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/<roles>/_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. <<realms>> and <<native-realm>>.
  19. [[security-api-clear-role-cache-path-params]]
  20. ==== {api-path-parms-title}
  21. `<roles>`::
  22. (Required, string)
  23. Comma-separated list of roles to evict from the role cache. To evict all
  24. roles, use `*`. Does not support other wildcard patterns.
  25. [[security-api-clear-role-cache-example]]
  26. ==== {api-examples-title}
  27. The clear roles cache API evicts roles from the native role cache. For example,
  28. to clear the cache for `my_admin_role`:
  29. [source,console]
  30. --------------------------------------------------
  31. POST /_security/role/my_admin_role/_clear_cache
  32. --------------------------------------------------
  33. Specify multiple roles as a comma-separated list.
  34. [source,console]
  35. ----
  36. POST /_security/role/my_admin_role,my_test_role/_clear_cache
  37. ----
  38. To clear all roles from the cache, use `*`.
  39. [source,console]
  40. ----
  41. POST /_security/role/*/_clear_cache
  42. ----