Upgrade a snapshot
Generally available; Added in 5.4.0
Upgrade an anomaly detection model snapshot to the latest major version. Over time, older snapshot formats are deprecated and removed. Anomaly detection jobs support only snapshots that are from the current or previous major version. This API provides a means to upgrade a snapshot to the current major version. This aids in preparing the cluster for an upgrade to the next major version. Only one snapshot per anomaly detection job can be upgraded at a time and the upgraded snapshot cannot be the current snapshot of the anomaly detection job.
Required authorization
- Cluster privileges:
manage_ml
Path parameters
-
Identifier for the anomaly detection job.
-
A numerical character string that uniquely identifies the model snapshot.
POST
/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade
Console
POST _ml/anomaly_detectors/low_request_rate/model_snapshots/1828371/_upgrade?timeout=45m&wait_for_completion=true
resp = client.ml.upgrade_job_snapshot(
job_id="low_request_rate",
snapshot_id="1828371",
timeout="45m",
wait_for_completion=True,
)
const response = await client.ml.upgradeJobSnapshot({
job_id: "low_request_rate",
snapshot_id: 1828371,
timeout: "45m",
wait_for_completion: "true",
});
response = client.ml.upgrade_job_snapshot(
job_id: "low_request_rate",
snapshot_id: "1828371",
timeout: "45m",
wait_for_completion: "true"
)
$resp = $client->ml()->upgradeJobSnapshot([
"job_id" => "low_request_rate",
"snapshot_id" => "1828371",
"timeout" => "45m",
"wait_for_completion" => "true",
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/model_snapshots/1828371/_upgrade?timeout=45m&wait_for_completion=true"