close-job.asciidoc 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --
  2. :api: close-job
  3. :request: CloseJobRequest
  4. :response: CloseJobResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Close {anomaly-job} API
  8. Closes {anomaly-jobs} in the cluster. It accepts a +{request}+ object and responds with a +{response}+ object.
  9. [id="{upid}-{api}-request"]
  10. ==== Close {anomaly-job} request
  11. A +{request}+ object gets created with an existing non-null `jobId`.
  12. ["source","java",subs="attributes,callouts,macros"]
  13. --------------------------------------------------
  14. include-tagged::{doc-tests-file}[{api}-request]
  15. --------------------------------------------------
  16. <1> Constructing a new request referencing existing job IDs
  17. <2> Optionally used to close a failed job, or to forcefully close a job
  18. which has not responded to its initial close request.
  19. <3> Optionally set to ignore if a wildcard expression matches no jobs.
  20. (This includes `_all` string or when no jobs have been specified)
  21. <4> Optionally setting the `timeout` value for how long the
  22. execution should wait for the job to be closed.
  23. [id="{upid}-{api}-response"]
  24. ==== Close {anomaly-job} response
  25. ["source","java",subs="attributes,callouts,macros"]
  26. --------------------------------------------------
  27. include-tagged::{doc-tests-file}[{api}-response]
  28. --------------------------------------------------
  29. <1> `isClosed()` from the +{response}+ indicates if the job was successfully
  30. closed or not.
  31. include::../execution.asciidoc[]