forecast-job.asciidoc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --
  2. :api: forecast-job
  3. :request: ForecastJobRequest
  4. :response: ForecastJobResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Forecast Job API
  8. The Forecast Job API provides the ability to forecast a {ml} job's behavior based
  9. on historical data.
  10. It accepts a +{request}+ object and responds
  11. with a +{response}+ object.
  12. [id="{upid}-{api}-request"]
  13. ==== Forecast Job Request
  14. A +{request}+ object gets created with an existing non-null `jobId`.
  15. All other fields are optional for the request.
  16. ["source","java",subs="attributes,callouts,macros"]
  17. --------------------------------------------------
  18. include-tagged::{doc-tests-file}[{api}-request]
  19. --------------------------------------------------
  20. <1> Constructing a new request referencing an existing `jobId`
  21. ==== Optional Arguments
  22. The following arguments are optional.
  23. ["source","java",subs="attributes,callouts,macros"]
  24. --------------------------------------------------
  25. include-tagged::{doc-tests-file}[{api}-request-options]
  26. --------------------------------------------------
  27. <1> Set when the forecast for the job should expire
  28. <2> Set how far into the future should the forecast predict
  29. [id="{upid}-{api}-response"]
  30. ==== Forecast Job Response
  31. A +{response}+ contains an acknowledgement and the forecast ID
  32. ["source","java",subs="attributes,callouts,macros"]
  33. --------------------------------------------------
  34. include-tagged::{doc-tests-file}[{api}-response]
  35. --------------------------------------------------
  36. <1> `isAcknowledged()` indicates if the forecast was successful
  37. <2> `getForecastId()` provides the ID of the forecast that was created
  38. include::../execution.asciidoc[]