2018-10-05 11:45:46 -04:00
|
|
|
--
|
|
|
|
:api: get-calendars
|
|
|
|
:request: GetCalendarsRequest
|
|
|
|
:response: GetCalendarsResponse
|
|
|
|
--
|
2019-09-10 11:26:56 -04:00
|
|
|
[role="xpack"]
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}"]
|
2019-07-30 13:52:23 -04:00
|
|
|
=== Get calendars API
|
2018-09-18 06:51:11 -04:00
|
|
|
Retrieves one or more calendar objects.
|
2018-10-05 11:45:46 -04:00
|
|
|
It accepts a +{request}+ and responds
|
|
|
|
with a +{response}+ object.
|
2018-09-18 06:51:11 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-request"]
|
2019-07-30 13:52:23 -04:00
|
|
|
==== Get calendars request
|
2018-09-18 06:51:11 -04:00
|
|
|
|
2019-07-30 13:52:23 -04:00
|
|
|
By default, a +{request}+ with no calendar ID set will return all
|
2018-09-18 06:51:11 -04:00
|
|
|
calendars. Using the literal `_all` also returns all calendars.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
2018-09-18 06:51:11 -04:00
|
|
|
--------------------------------------------------
|
2019-07-30 13:52:23 -04:00
|
|
|
<1> Constructing a new request for all calendars.
|
2018-09-18 06:51:11 -04:00
|
|
|
|
2019-07-30 13:52:23 -04:00
|
|
|
==== Optional arguments
|
2018-09-18 06:51:11 -04:00
|
|
|
The following arguments are optional:
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-id]
|
2018-09-18 06:51:11 -04:00
|
|
|
--------------------------------------------------
|
2019-07-30 13:52:23 -04:00
|
|
|
<1> Construct a request for the single calendar `holidays`.
|
2018-09-18 06:51:11 -04:00
|
|
|
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-page]
|
2018-09-18 06:51:11 -04:00
|
|
|
--------------------------------------------------
|
2019-07-30 13:52:23 -04:00
|
|
|
<1> The page parameters `from` and `size`. `from` specifies the number of
|
|
|
|
calendars to skip. `size` specifies the maximum number of calendars to get.
|
|
|
|
Defaults to `0` and `100` respectively.
|
2018-09-18 06:51:11 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
include::../execution.asciidoc[]
|
2018-09-18 06:51:11 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-response"]
|
2019-07-30 13:52:23 -04:00
|
|
|
==== Get calendars response
|
2018-09-18 06:51:11 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
The returned +{response}+ contains the requested calendars:
|
2018-09-18 06:51:11 -04:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
2018-09-18 06:51:11 -04:00
|
|
|
--------------------------------------------------
|
2019-07-30 13:52:23 -04:00
|
|
|
<1> The count of calendars that were matched.
|
|
|
|
<2> The calendars retrieved.
|