Path parameters

  • job_idstring Required

    Identifier for the anomaly detection job.

  • forecast_idstring Required

    A comma-separated list of forecast identifiers. If you do not specify this optional parameter or if you specify _all or * the API deletes all forecasts from the job.

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.

  • timeoutstring

    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 or 0.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledgedboolean Required

      For a successful response, this value is always true. On failure, an exception is returned instead.

DELETE /_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}
DELETE _ml/anomaly_detectors/total-requests/_forecast/_all
resp = client.ml.delete_forecast(
    job_id="total-requests",
    forecast_id="_all",
)
const response = await client.ml.deleteForecast({
  job_id: "total-requests",
  forecast_id: "_all",
});
response = client.ml.delete_forecast(
  job_id: "total-requests",
  forecast_id: "_all"
)
$resp = $client->ml()->deleteForecast([
    "job_id" => "total-requests",
    "forecast_id" => "_all",
]);
curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/anomaly_detectors/total-requests/_forecast/_all"
Response examples (200)
A successful response when deleting a forecast from an anomaly detection job.
{
  "acknowledged": true
}