clear-privileges-cache.asciidoc 1.7 KB

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