clear-api-key-cache.asciidoc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. [role="xpack"]
  2. [[security-api-clear-api-key-cache]]
  3. === Clear API key cache API
  4. ++++
  5. <titleabbrev>Clear API key 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 a subset of all entries from the API key cache.
  13. The cache is also automatically cleared on state changes of the security index.
  14. [[security-api-clear-api-key-cache-request]]
  15. ==== {api-request-title}
  16. `POST /_security/api_key/<ids>/_clear_cache`
  17. [[security-api-clear-api-key-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-api-key-cache-desc]]
  22. ==== {api-description-title}
  23. For more information about API keys, see <<security-api-create-api-key>>,
  24. <<security-api-get-api-key>>, and <<security-api-invalidate-api-key>>.
  25. [[security-api-clear-api-key-cache-path-params]]
  26. ==== {api-path-parms-title}
  27. `<ids>`::
  28. (Required, string)
  29. Comma-separated list of API key IDs to evict from the API key cache. To evict
  30. all API keys, use `*`. Does not support other wildcard patterns.
  31. [[security-api-clear-api-key-cache-example]]
  32. ==== {api-examples-title}
  33. The clear API key cache API evicts entries from the API key cache.
  34. For example, to clear the entry of API key with ID `yVGMr3QByxdh1MSaicYx`.
  35. [source,console]
  36. --------------------------------------------------
  37. POST /_security/api_key/yVGMr3QByxdh1MSaicYx/_clear_cache
  38. --------------------------------------------------
  39. Specify multiple API keys as a comma-separated list.
  40. [source,console]
  41. ----
  42. POST /_security/api_key/yVGMr3QByxdh1MSaicYx,YoiMaqREw0YVpjn40iMg/_clear_cache
  43. ----
  44. To clear all entries from the API key cache, use `*`.
  45. [source,console]
  46. ----
  47. POST /_security/api_key/*/_clear_cache
  48. ----