clear-roles-cache.asciidoc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. [role="xpack"]
  2. [[security-api-clear-role-cache]]
  3. === Clear roles cache API
  4. ++++
  5. <titleabbrev>Clear roles cache</titleabbrev>
  6. ++++
  7. .New API reference
  8. [sidebar]
  9. --
  10. For the most up-to-date API details, refer to {api-es}/group/endpoint-security[Security APIs].
  11. --
  12. Evicts roles from the native role cache.
  13. [[security-api-clear-role-cache-request]]
  14. ==== {api-request-title}
  15. `POST /_security/role/<roles>/_clear_cache`
  16. [[security-api-clear-role-cache-prereqs]]
  17. ==== {api-prereq-title}
  18. * To use this API, you must have at least the `manage_security` cluster
  19. privilege.
  20. [[security-api-clear-role-cache-desc]]
  21. ==== {api-description-title}
  22. For more information about the native realm, see
  23. <<realms>> and <<native-realm>>.
  24. [[security-api-clear-role-cache-path-params]]
  25. ==== {api-path-parms-title}
  26. `<roles>`::
  27. (Required, string)
  28. Comma-separated list of roles to evict from the role cache. To evict all
  29. roles, use `*`. Does not support other wildcard patterns.
  30. [[security-api-clear-role-cache-example]]
  31. ==== {api-examples-title}
  32. The clear roles cache API evicts roles from the native role cache. For example,
  33. to clear the cache for `my_admin_role`:
  34. [source,console]
  35. --------------------------------------------------
  36. POST /_security/role/my_admin_role/_clear_cache
  37. --------------------------------------------------
  38. Specify multiple roles as a comma-separated list.
  39. [source,console]
  40. ----
  41. POST /_security/role/my_admin_role,my_test_role/_clear_cache
  42. ----
  43. To clear all roles from the cache, use `*`.
  44. [source,console]
  45. ----
  46. POST /_security/role/*/_clear_cache
  47. ----