get-calendars.asciidoc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --
  2. :api: get-calendars
  3. :request: GetCalendarsRequest
  4. :response: GetCalendarsResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Get Calendars API
  8. Retrieves one or more calendar objects.
  9. It accepts a +{request}+ and responds
  10. with a +{response}+ object.
  11. [id="{upid}-{api}-request"]
  12. ==== Get Calendars Request
  13. By default a +{request}+ with no calendar Id set will return all
  14. calendars. Using the literal `_all` also returns all calendars.
  15. ["source","java",subs="attributes,callouts,macros"]
  16. --------------------------------------------------
  17. include-tagged::{doc-tests-file}[{api}-request]
  18. --------------------------------------------------
  19. <1> Constructing a new request for all calendars
  20. ==== Optional Arguments
  21. The following arguments are optional:
  22. ["source","java",subs="attributes,callouts,macros"]
  23. --------------------------------------------------
  24. include-tagged::{doc-tests-file}[{api}-id]
  25. --------------------------------------------------
  26. <1> Construct a request for the single calendar `holidays`
  27. ["source","java",subs="attributes,callouts,macros"]
  28. --------------------------------------------------
  29. include-tagged::{doc-tests-file}[{api}-page]
  30. --------------------------------------------------
  31. <1> The page parameters `from` and `size`. `from` specifies the number of calendars to skip.
  32. `size` specifies the maximum number of calendars to get. Defaults to `0` and `100` respectively.
  33. include::../execution.asciidoc[]
  34. [id="{upid}-{api}-response"]
  35. ==== Get calendars Response
  36. The returned +{response}+ contains the requested calendars:
  37. ["source","java",subs="attributes,callouts,macros"]
  38. --------------------------------------------------
  39. include-tagged::{doc-tests-file}[{api}-response]
  40. --------------------------------------------------
  41. <1> The count of calendars that were matched
  42. <2> The calendars retrieved