IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Update model snapshots API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Update model snapshots API
editUpdates certain properties of a snapshot.
Request
editPOST _ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>/_update
Prerequisites
edit-
If the Elasticsearch security features are enabled, you must have
manage_ml
ormanage
cluster privileges to use this API. See Security privileges.
Path parameters
edit-
<job_id>
- (Required, string) Identifier for the anomaly detection job.
-
<snapshot_id>
- (Required, string) Identifier for the model snapshot.
Request body
editThe following properties can be updated after the model snapshot is created:
-
description
- (Optional, string) A description of the model snapshot. For example, "Before black friday".
-
retain
-
(Optional, boolean) If true, this snapshot will not be deleted during
automatic cleanup of snapshots older than
model_snapshot_retention_days
. Note that this snapshot will still be deleted when the anomaly detection job is deleted. The default value is false.
Examples
editThe following example updates the snapshot identified as 1491852978
:
POST _ml/anomaly_detectors/it_ops_new_logs/model_snapshots/1491852978/_update { "description": "Snapshot 1", "retain": true }
When the snapshot is updated, you receive the following results:
{ "acknowledged": true, "model": { "job_id": "it_ops_new_logs", "timestamp": 1491852978000, "description": "Snapshot 1", ... "retain": true } }