clear-privileges-cache.asciidoc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. [role="xpack"]
  2. [[security-api-clear-privilege-cache]]
  3. === Clear privileges cache API
  4. ++++
  5. <titleabbrev>Clear privileges 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 privileges from the native application privilege cache.
  13. The cache is also automatically cleared for applications that have their privileges updated.
  14. [[security-api-clear-privilege-cache-request]]
  15. ==== {api-request-title}
  16. `POST /_security/privilege/<applications>/_clear_cache`
  17. [[security-api-clear-privilege-cache-prereqs]]
  18. ==== {api-prereq-title}
  19. * To use this API, you must have at least the `manage_security` cluster
  20. privilege.
  21. [[security-api-clear-privilege-cache-desc]]
  22. ==== {api-description-title}
  23. For more information about the native realm, see
  24. <<realms>> and <<native-realm>>.
  25. [[security-api-clear-privilege-cache-path-params]]
  26. ==== {api-path-parms-title}
  27. `<applications>`::
  28. (Required, string)
  29. Comma-separated list of applications to clear. To clear all applications, use
  30. `*`. Does not support other wildcard patterns.
  31. [[security-api-clear-privilege-cache-example]]
  32. ==== {api-examples-title}
  33. The clear privileges cache API evicts privileges from the native application privilege cache.
  34. For example, to clear the cache for `myapp`:
  35. [source,console]
  36. --------------------------------------------------
  37. POST /_security/privilege/myapp/_clear_cache
  38. --------------------------------------------------
  39. Specify multiple applications as a comma-separated list.
  40. [source,console]
  41. --------------------------------------------------
  42. POST /_security/privilege/myapp,my-other-app/_clear_cache
  43. --------------------------------------------------
  44. To clear the cache for all applications, use `*`.
  45. [source,console]
  46. ----
  47. POST /_security/privilege/*/_clear_cache
  48. ----