Search + K

Command Palette

Search for a command to run...

Sign In

Delete forecasts from a job

DELETE /_ml/anomaly_detectors/{job_id}/_forecast
Copy endpoint

By default, forecasts are retained for 14 days. You can specify a different retention period with the expires_in parameter in the forecast jobs API. The delete forecast API enables you to delete one or more forecasts before they expire.

Required authorization

  • Cluster privileges: manage_ml

Parameters

path Path Parameters

Name Type
job_id required

Identifier for the anomaly detection job.

type TypesId = string

query Query Parameters

Name Type
allow_no_forecasts

Specifies whether an error occurs when there are no forecasts. In particular, if this parameter is set to false and there are no forecasts associated with the job, attempts to delete all forecasts return an error.

boolean
timeout

Specifies the period of time to wait for the completion of the delete operation. When this period of time elapses, the API fails and returns an error.

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

Responses

200 application/json
interface TypesAcknowledgedResponseBase {
acknowledged: boolean;
}