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 Job API
  8. The Get Job API provides the ability to get {ml} jobs in the cluster.
  9. It accepts a +{request}+ object and responds
  10. with a +{response}+ object.
  11. [id="{upid}-{api}-request"]
  12. ==== Get Job 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 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`, can contain wildcards
  21. <2> Whether to ignore if a wildcard expression matches no jobs.
  22. (This includes `_all` string or when no jobs have been specified)
  23. [id="{upid}-{api}-response"]
  24. ==== Get Job 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[]