get-calendar-events.asciidoc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. --
  2. :api: get-calendar-events
  3. :request: GetCalendarEventsRequest
  4. :response: GetCalendarEventsResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Get calendar events API
  9. Retrieves a calendar's events.
  10. It accepts a +{request}+ and responds
  11. with a +{response}+ object.
  12. [id="{upid}-{api}-request"]
  13. ==== Get calendars request
  14. A +{request}+ requires a non-null calendar ID.
  15. Using the literal `_all` returns the events for all calendars.
  16. ["source","java",subs="attributes,callouts,macros"]
  17. --------------------------------------------------
  18. include-tagged::{doc-tests-file}[{api}-request]
  19. --------------------------------------------------
  20. <1> Constructing a new request for the specified calendarId.
  21. ==== Optional arguments
  22. The following arguments are optional:
  23. ["source","java",subs="attributes,callouts,macros"]
  24. --------------------------------------------------
  25. include-tagged::{doc-tests-file}[{api}-page]
  26. --------------------------------------------------
  27. <1> The page parameters `from` and `size`. `from` specifies the number of events to skip.
  28. `size` specifies the maximum number of events to get. Defaults to `0` and `100` respectively.
  29. ["source","java",subs="attributes,callouts,macros"]
  30. --------------------------------------------------
  31. include-tagged::{doc-tests-file}[{api}-start]
  32. --------------------------------------------------
  33. <1> Specifies to get events with timestamps after this time.
  34. ["source","java",subs="attributes,callouts,macros"]
  35. --------------------------------------------------
  36. include-tagged::{doc-tests-file}[{api}-end]
  37. --------------------------------------------------
  38. <1> Specifies to get events with timestamps earlier than this time.
  39. ["source","java",subs="attributes,callouts,macros"]
  40. --------------------------------------------------
  41. include-tagged::{doc-tests-file}[{api}-jobid]
  42. --------------------------------------------------
  43. <1> Get events for the job. When this option is used calendar_id must be `_all`.
  44. include::../execution.asciidoc[]
  45. [id="{upid}-{api}-response"]
  46. ==== Get calendars response
  47. The returned +{response}+ contains the requested events:
  48. ["source","java",subs="attributes,callouts,macros"]
  49. --------------------------------------------------
  50. include-tagged::{doc-tests-file}[{api}-response]
  51. --------------------------------------------------
  52. <1> The count of events that were matched.
  53. <2> The events retrieved.