get-job.asciidoc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --
  2. :api: get-job
  3. :request: GetJobRequest
  4. :response: GetJobResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Get {anomaly-jobs} API
  8. Retrieves configuration information for {anomaly-jobs} in the cluster.
  9. It accepts a +{request}+ object and responds with a +{response}+ object.
  10. [id="{upid}-{api}-request"]
  11. ==== Get {anomaly-jobs} request
  12. A +{request}+ object gets can have any number of `jobId` or `groupName`
  13. entries. However, they all must be non-null. An empty list is the same as
  14. requesting for all {anomaly-jobs}.
  15. ["source","java",subs="attributes,callouts,macros"]
  16. --------------------------------------------------
  17. include-tagged::{doc-tests-file}[{api}-request]
  18. --------------------------------------------------
  19. <1> Constructing a new request referencing existing `jobIds`. It can contain
  20. wildcards.
  21. <2> Whether to ignore if a wildcard expression matches no {anomaly-jobs}.
  22. (This includes `_all` string or when no jobs have been specified).
  23. [id="{upid}-{api}-response"]
  24. ==== Get {anomaly-jobs} response
  25. ["source","java",subs="attributes,callouts,macros"]
  26. --------------------------------------------------
  27. include-tagged::{doc-tests-file}[{api}-response]
  28. --------------------------------------------------
  29. <1> `getCount()` from the +{response}+ indicates the number of jobs found.
  30. <2> `getJobs()` is the collection of {ml} `Job` objects found.
  31. include::../execution.asciidoc[]