Type to search.

Revert to a snapshot

Auth The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 5.4 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

The machine learning features react quickly to anomalous input, learning new behaviors in data. Highly anomalous input increases the variance in the models whilst the system learns whether this is a new step-change in behavior or a one-off event. In the case where this anomalous input is known to be a one-off, then it might be appropriate to reset the model state to a time before this event. For example, you might consider reverting to a saved snapshot after Black Friday or a critical system failure.

Required privileges

Cluster privileges manage_ml

Path parameters

job_id string required

Identifier for the anomaly detection job.

snapshot_id string required

You can specify empty as the <snapshot_id>. Reverting to the empty snapshot means the anomaly detection job starts learning a new model from scratch when it is started.

Query parameters

delete_intervening_results boolean · default: false

If true, deletes the results in the time period between the latest results and the time of the reverted snapshot. It also resets the model to accept records for this time period. If you choose not to delete intervening results when reverting a snapshot, the job will not accept input data that is older than the current time. If you want to resend data, then delete the intervening results.

Request body

delete_intervening_results boolean · default: false

Refer to the description for the delete_intervening_results query parameter.

Response

application/json
model object required
description string

An optional description of the job.

job_id string required

A numerical character string that uniquely identifies the job that the snapshot was created for.

latest_record_time_stamp number

The timestamp of the latest processed record.

latest_result_time_stamp number

The timestamp of the latest bucket result.

min_version string required

The minimum version required to be able to restore the model snapshot.

retain boolean required

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. The default value is false.

snapshot_doc_count number required

For internal use only.

snapshot_id string required

A numerical character string that uniquely identifies the model snapshot.

timestamp number required

The creation timestamp for the snapshot.