2018-10-05 11:45:46 -04:00
|
|
|
--
|
|
|
|
:api: forecast-job
|
|
|
|
:request: ForecastJobRequest
|
|
|
|
:response: ForecastJobResponse
|
|
|
|
--
|
2019-09-10 11:26:56 -04:00
|
|
|
[role="xpack"]
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}"]
|
2018-09-07 12:16:58 -04:00
|
|
|
=== Forecast Job API
|
|
|
|
|
|
|
|
The Forecast Job API provides the ability to forecast a {ml} job's behavior based
|
|
|
|
on historical data.
|
2018-10-05 11:45:46 -04:00
|
|
|
It accepts a +{request}+ object and responds
|
|
|
|
with a +{response}+ object.
|
2018-09-07 12:16:58 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-request"]
|
2018-09-07 12:16:58 -04:00
|
|
|
==== Forecast Job Request
|
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
A +{request}+ object gets created with an existing non-null `jobId`.
|
2018-09-07 12:16:58 -04:00
|
|
|
All other fields are optional for the request.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
2018-09-07 12:16:58 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> Constructing a new request referencing an existing `jobId`
|
|
|
|
|
|
|
|
==== Optional Arguments
|
|
|
|
|
|
|
|
The following arguments are optional.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request-options]
|
2018-09-07 12:16:58 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> Set when the forecast for the job should expire
|
|
|
|
<2> Set how far into the future should the forecast predict
|
2020-05-29 11:16:08 -04:00
|
|
|
<3> Set the maximum amount of memory the forecast is allowed to use.
|
|
|
|
Defaults to 20mb. Maximum is 500mb, minimum is 1mb. If set to
|
|
|
|
40% or more of the job's configured memory limit, it is
|
|
|
|
automatically reduced to below that number.
|
2018-09-07 12:16:58 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-response"]
|
2018-09-07 12:16:58 -04:00
|
|
|
==== Forecast Job Response
|
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
A +{response}+ contains an acknowledgement and the forecast ID
|
2018-09-07 12:16:58 -04:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
2018-09-07 12:16:58 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> `isAcknowledged()` indicates if the forecast was successful
|
2018-10-05 11:45:46 -04:00
|
|
|
<2> `getForecastId()` provides the ID of the forecast that was created
|
|
|
|
|
|
|
|
include::../execution.asciidoc[]
|