Path parameters
-
Identifier for the anomaly detection job. The job must be open when you create a forecast; otherwise, an error occurs.
Query parameters
-
A period of time that indicates how far into the future to forecast. For example,
30dcorresponds to 30 days. The forecast starts at the last record that was processed.Default value is
1d. -
The period of time that forecast results are retained. After a forecast expires, the results are deleted. If set to a value of 0, the forecast is never automatically deleted.
Default value is
14d. -
The maximum memory the forecast can use. If the forecast needs to use more than the provided amount, it will spool to disk. Default is 20mb, maximum is 500mb and minimum is 1mb. If set to 40% or more of the job’s configured memory limit, it is automatically reduced to below that amount.
Default value is
20mb.
Body
-
Refer to the description for the
durationquery parameter.External documentation -
Refer to the description for the
expires_inquery parameter.External documentation -
Refer to the description for the
max_model_memoryquery parameter.Default value is
20mb.
POST _ml/anomaly_detectors/low_request_rate/_forecast
{
"duration": "10d"
}
resp = client.ml.forecast(
job_id="low_request_rate",
duration="10d",
)
const response = await client.ml.forecast({
job_id: "low_request_rate",
duration: "10d",
});
response = client.ml.forecast(
job_id: "low_request_rate",
body: {
"duration": "10d"
}
)
$resp = $client->ml()->forecast([
"job_id" => "low_request_rate",
"body" => [
"duration" => "10d",
],
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"duration":"10d"}' "$ELASTICSEARCH_URL/_ml/anomaly_detectors/low_request_rate/_forecast"
var response = await client.MachineLearning
.ForecastAsync(jobId: "low_request_rate", d1 => d1
.Duration("10d")
);
client.ml().forecast(f -> f
.duration(d -> d
.time("10d")
)
.jobId("low_request_rate")
);
{
"duration": "10d"
}