Update a snapshot Generally available; Added in 5.4.0

POST /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update

Updates certain properties of a snapshot.

Required authorization

  • Cluster privileges: manage_ml

Path parameters

  • job_id string Required

    Identifier for the anomaly detection job.

  • snapshot_id string Required

    Identifier for the model snapshot.

application/json

Body Required

  • A description of the model snapshot.

  • retain boolean

    If true, this snapshot will not be deleted during automatic cleanup of snapshots older than model_snapshot_retention_days. However, this snapshot will be deleted when the job is deleted.

Responses

POST /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update
POST
_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update
{
  "description": "Snapshot 1",
  "retain": true
}
curl \
 --request POST 'http://api.example.com/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '"_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update\n{\n  \"description\": \"Snapshot 1\",\n  \"retain\": true\n}"'
Request example
An example body for a `POST` request.
_ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update
{
  "description": "Snapshot 1",
  "retain": true
}