get-job.asciidoc 1.5 KB

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