slm-get-status.asciidoc 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. Retrieves the status of {slm} ({slm-init}).
  9. [[slm-api-get-status-request]]
  10. ==== {api-request-title}
  11. `GET /_slm/status`
  12. [[slm-api-get-status-desc]]
  13. ==== {api-description-title}
  14. Returns the status of the {slm-init} plugin.
  15. The `operation_mode` field in the response shows one of three states:
  16. `RUNNING`, `STOPPING`, or `STOPPED`.
  17. You halt and restart the {slm-init} plugin with the
  18. <<slm-api-stop, stop>> and <<slm-api-start, start>> APIs.
  19. ==== {api-query-parms-title}
  20. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
  21. [[slm-api-get-status-prereqs]]
  22. ==== {api-prereq-title}
  23. If the {es} {security-features} are enabled, you must have the
  24. `manage_slm` or `read_slm` cluster privileges to use this API.
  25. For more information, see <<security-privileges>>.
  26. [[slm-api-get-status-example]]
  27. ==== {api-examples-title}
  28. [source,console]
  29. --------------------------------------------------
  30. GET _slm/status
  31. --------------------------------------------------
  32. The API returns the following result:
  33. [source,console-result]
  34. --------------------------------------------------
  35. {
  36. "operation_mode": "RUNNING"
  37. }
  38. --------------------------------------------------
  39. // TESTRESPONSE[s/"operation_mode": "RUNNING"/"operation_mode": $body.operation_mode/]