forecast-job.asciidoc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --
  2. :api: forecast-job
  3. :request: ForecastJobRequest
  4. :response: ForecastJobResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Forecast jobs API
  9. Forecasts a {ml} job's behavior based on historical data. It accepts a
  10. +{request}+ object and responds with a +{response}+ object.
  11. [id="{upid}-{api}-request"]
  12. ==== Forecast jobs request
  13. A +{request}+ object gets created with an existing non-null `jobId`.
  14. All other fields are optional for the request.
  15. ["source","java",subs="attributes,callouts,macros"]
  16. --------------------------------------------------
  17. include-tagged::{doc-tests-file}[{api}-request]
  18. --------------------------------------------------
  19. <1> Constructing a new request referencing an existing `jobId`
  20. ==== Optional arguments
  21. The following arguments are optional.
  22. ["source","java",subs="attributes,callouts,macros"]
  23. --------------------------------------------------
  24. include-tagged::{doc-tests-file}[{api}-request-options]
  25. --------------------------------------------------
  26. <1> Set when the forecast for the job should expire
  27. <2> Set how far into the future should the forecast predict
  28. <3> Set the maximum amount of memory the forecast is allowed to use.
  29. Defaults to 20mb. Maximum is 500mb, minimum is 1mb. If set to
  30. 40% or more of the job's configured memory limit, it is
  31. automatically reduced to below that number.
  32. [id="{upid}-{api}-response"]
  33. ==== Forecast jobs response
  34. A +{response}+ contains an acknowledgement and the forecast ID
  35. ["source","java",subs="attributes,callouts,macros"]
  36. --------------------------------------------------
  37. include-tagged::{doc-tests-file}[{api}-response]
  38. --------------------------------------------------
  39. <1> `isAcknowledged()` indicates if the forecast was successful
  40. <2> `getForecastId()` provides the ID of the forecast that was created
  41. include::../execution.asciidoc[]