Get model snapshots info
Generally available; Added in 5.4.0
Required authorization
- Cluster privileges:
monitor_ml
Path parameters
-
job_id
string Required Identifier for the anomaly detection job.
-
snapshot_id
string Required A numerical character string that uniquely identifies the model snapshot. You can get information for multiple snapshots by using a comma-separated list or a wildcard expression. You can get all snapshots by using
_all
, by specifying*
as the snapshot ID, or by omitting the snapshot ID.
Query parameters
-
desc
boolean If true, the results are sorted in descending order.
-
end
string | number Returns snapshots with timestamps earlier than this time.
-
from
number Skips the specified number of snapshots.
-
size
number Specifies the maximum number of snapshots to obtain.
-
sort
string Specifies the sort field for the requested snapshots. By default, the snapshots are sorted by their timestamp.
-
start
string | number Returns snapshots with timestamps after this time.
Body
POST
/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}
Console
GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots
{
"start": "1575402236000"
}
curl \
--request POST 'http://api.example.com/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"start\": \"1575402236000\"\n}"'
Request example
An example body for a `GET _ml/anomaly_detectors/high_sum_total_sales/model_snapshots` request.
{
"start": "1575402236000"
}