Search + K

Command Palette

Search for a command to run...

Sign In

Delete expired ML data

DELETE /_ml/_delete_expired_data
Copy endpoint

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 authorization

  • Cluster privileges: manage_ml

Parameters

query Query Parameters

Name Type
requests_per_second

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

number
timeout

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

type TypesDuration = string | "-1" | "0"

Request Body

application/json
{ requests_per_second?: number;timeout?: TypesDuration

A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

type TypesDuration = string | "-1" | "0"
; }

Responses

200 application/json
{ deleted: boolean; }