# Delete forecasts from a job
**DELETE /_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}**
**All methods and paths for this operation:**
DELETE
/_ml/anomaly_detectors/{job_id}/_forecast
DELETE
/_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}
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`
## Servers
- http://api.example.com: http://api.example.com ()
## Authentication methods
- Api key auth
- Basic auth
- Bearer auth
## Parameters
### Path parameters
- **job_id** (string)
Identifier for the anomaly detection job.
- **forecast_id** (string)
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
- **allow_no_forecasts** (boolean)
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.
- **timeout** (string)
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.
## Responses
### 200
#### Body: application/json (object)
- **acknowledged** (boolean)
For a successful response, this value is always true. On failure, an exception is returned instead.
[Powered by Bump.sh](https://bump.sh)