close-job.asciidoc 1.4 KB

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