OpenSearch/docs/reference/slm/apis/slm-get-status.asciidoc

53 lines
1.4 KiB
Plaintext

[[slm-api-get-status]]
=== Get {slm} status API
[subs="attributes"]
++++
<titleabbrev>Get {slm} status</titleabbrev>
++++
Retrieves the status of {slm} ({slm-init}).
[[slm-api-get-status-request]]
==== {api-request-title}
`GET /_slm/status`
[[slm-api-get-status-desc]]
==== {api-description-title}
Returns the status of the {slm-init} plugin.
The `operation_mode` field in the response shows one of three states:
`STARTED`, `STOPPING`, or `STOPPED`.
You halt and restart the {slm-init} plugin with the
<<slm-api-stop, stop>> and <<slm-api-start, start>> APIs.
==== {api-query-parms-title}
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
[[slm-api-get-status-prereqs]]
==== {api-prereq-title}
If the {es} {security-features} are enabled, you must have the
`manage_slm` or `read_slm` cluster privileges to use this API.
For more information, see <<security-privileges>>.
[[slm-api-get-status-example]]
==== {api-examples-title}
[source,console]
--------------------------------------------------
GET _slm/status
--------------------------------------------------
The API returns the following result:
[source,console-result]
--------------------------------------------------
{
"operation_mode": "RUNNING"
}
--------------------------------------------------
// TESTRESPONSE[s/"operation_mode": "RUNNING"/"operation_mode": $body.operation_mode/]