Delete forecasts from a job
Added in 6.5.0
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.
Query parameters
-
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. -
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.
Values are
-1
or0
.
DELETE
/_ml/anomaly_detectors/{job_id}/_forecast
curl \
--request DELETE 'http://api.example.com/_ml/anomaly_detectors/{job_id}/_forecast' \
--header "Authorization: $API_KEY"
Response examples (200)
A successful response when deleting a forecast from an anomaly detection job.
{
"acknowledged": true
}