slm-get-status.asciidoc 1.4 KB

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