slm-get-status.asciidoc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. [role="xpack"]
  2. [[slm-api-get-status]]
  3. === Get {slm} status API
  4. [subs="attributes"]
  5. ++++
  6. <titleabbrev>Get {slm} status</titleabbrev>
  7. ++++
  8. .New API reference
  9. [sidebar]
  10. --
  11. For the most up-to-date API details, refer to {api-es}/group/endpoint-slm[{slm-cap} APIs].
  12. --
  13. Retrieves the status of {slm} ({slm-init}).
  14. [[slm-api-get-status-request]]
  15. ==== {api-request-title}
  16. `GET /_slm/status`
  17. [[slm-api-get-status-desc]]
  18. ==== {api-description-title}
  19. Returns the status of the {slm-init} plugin.
  20. The `operation_mode` field in the response shows one of three states:
  21. `RUNNING`, `STOPPING`, or `STOPPED`.
  22. You halt and restart the {slm-init} plugin with the
  23. <<slm-api-stop, stop>> and <<slm-api-start, start>> APIs.
  24. ==== {api-query-parms-title}
  25. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
  26. [[slm-api-get-status-prereqs]]
  27. ==== {api-prereq-title}
  28. If the {es} {security-features} are enabled, you must have the
  29. `manage_slm` or `read_slm` cluster privileges to use this API.
  30. For more information, see <<security-privileges>>.
  31. [[slm-api-get-status-example]]
  32. ==== {api-examples-title}
  33. [source,console]
  34. --------------------------------------------------
  35. GET _slm/status
  36. --------------------------------------------------
  37. The API returns the following result:
  38. [source,console-result]
  39. --------------------------------------------------
  40. {
  41. "operation_mode": "RUNNING"
  42. }
  43. --------------------------------------------------
  44. // TESTRESPONSE[s/"operation_mode": "RUNNING"/"operation_mode": $body.operation_mode/]