get-categories.asciidoc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --
  2. :api: get-categories
  3. :request: GetCategoriesRequest
  4. :response: GetCategoriesResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Get Categories API
  8. The Get Categories API retrieves one or more category results.
  9. It accepts a +{request}+ object and responds
  10. with a +{response}+ object.
  11. [id="{upid}-{api}-request"]
  12. ==== Get Categories Request
  13. A +{request}+ object gets created with an existing non-null `jobId`.
  14. ["source","java",subs="attributes,callouts,macros"]
  15. --------------------------------------------------
  16. include-tagged::{doc-tests-file}[{api}-request]
  17. --------------------------------------------------
  18. <1> Constructing a new request referencing an existing `jobId`
  19. ==== Optional Arguments
  20. The following arguments are optional:
  21. ["source","java",subs="attributes,callouts,macros"]
  22. --------------------------------------------------
  23. include-tagged::{doc-tests-file}[{api}-category-id]
  24. --------------------------------------------------
  25. <1> The id of the category to get. Otherwise it will return all categories.
  26. ["source","java",subs="attributes,callouts,macros"]
  27. --------------------------------------------------
  28. include-tagged::{doc-tests-file}[{api}-page]
  29. --------------------------------------------------
  30. <1> The page parameters `from` and `size`. `from` specifies the number of categories to skip.
  31. `size` specifies the maximum number of categories to get. Defaults to `0` and `100` respectively.
  32. include::../execution.asciidoc[]
  33. [id="{upid}-{api}-response"]
  34. ==== Get Categories Response
  35. The returned +{response}+ contains the requested categories:
  36. ["source","java",subs="attributes,callouts,macros"]
  37. --------------------------------------------------
  38. include-tagged::{doc-tests-file}[{api}-response]
  39. --------------------------------------------------
  40. <1> The count of categories that were matched
  41. <2> The categories retrieved