Type to search.

Delete expired ML data

  • DELETE /_ml/_delete_expired_data/{job_id}
  • DELETE /_ml/_delete_expired_data
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.

Delete all job results, model snapshots and forecast data that have exceeded their retention days period. Machine learning state documents that are not associated with any job are also deleted. You can limit the request to a single or set of anomaly detection jobs by using a job identifier, a group name, a comma-separated list of jobs, or a wildcard expression. You can delete expired data for all anomaly detection jobs by using _all, by specifying * as the <job_id>, or by omitting the <job_id>.

Required privileges

Cluster privileges manage_ml

Path parameters

job_id string optional

Identifier for an anomaly detection job. It can be a job identifier, a group name, or a wildcard expression.

Leave it out to use /_ml/_delete_expired_data.

Query parameters

requests_per_second number

The desired requests per second for the deletion processes. The default behavior is no throttling.

timeout union oneOf · default: 8h

How long can the underlying delete processes run until they are canceled.

Values: -1 0

Request body

requests_per_second number

The desired requests per second for the deletion processes. The default behavior is no throttling.

timeout union oneOf · default: 8h

How long can the underlying delete processes run until they are canceled.

Values: -1 0

Response

application/json
deleted boolean required