delete-forecast.asciidoc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --
  2. :api: delete-forecast
  3. :request: DeleteForecastRequest
  4. :response: AcknowledgedResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Delete Forecast API
  9. The Delete Forecast API provides the ability to delete a {ml} job's
  10. forecast in the cluster.
  11. It accepts a +{request}+ object and responds
  12. with an +{response}+ object.
  13. [id="{upid}-{api}-request"]
  14. ==== Delete Forecast Request
  15. A +{request}+ object gets created with an existing non-null `jobId`.
  16. All other fields are optional for the request.
  17. ["source","java",subs="attributes,callouts,macros"]
  18. --------------------------------------------------
  19. include-tagged::{doc-tests-file}[{api}-request]
  20. --------------------------------------------------
  21. <1> Constructing a new request referencing an existing `jobId`
  22. ==== Optional Arguments
  23. The following arguments are optional.
  24. ["source","java",subs="attributes,callouts,macros"]
  25. --------------------------------------------------
  26. include-tagged::{doc-tests-file}[{api}-request-options]
  27. --------------------------------------------------
  28. <1> Sets the specific forecastIds to delete, can be set to `_all` to indicate ALL forecasts for the given
  29. `jobId`
  30. <2> Set the timeout for the request to respond, default is 30 seconds
  31. <3> Set the `allow_no_forecasts` option. When `true` no error will be returned if an `_all`
  32. request finds no forecasts. It defaults to `true`
  33. [id="{upid}-{api}-response"]
  34. ==== Delete Forecast Response
  35. An +{response}+ contains an acknowledgement of the forecast(s) deletion
  36. ["source","java",subs="attributes,callouts,macros"]
  37. --------------------------------------------------
  38. include-tagged::{doc-tests-file}[{api}-response]
  39. --------------------------------------------------
  40. <1> `isAcknowledged()` indicates if the forecast was successfully deleted or not.
  41. include::../execution.asciidoc[]