@@ -26,8 +26,8 @@ Requires the `monitor_ml` cluster privilege. This privilege is included in the
26
26
27
27
You can get scheduled event information for multiple calendars in a single
28
28
API request by using a comma-separated list of ids or a wildcard expression.
29
- You can get scheduled event information for all calendars by using `_all`,
30
- by specifying `*` as the `<calendar_id>`, or by omitting the `<calendar_id>`.
29
+ You can get scheduled event information for all calendars by using `_all` or `*`
30
+ as the `<calendar_id>`.
31
31
32
32
For more information, see
33
33
{ml-docs}/ml-calendars.html[Calendars and scheduled events].
@@ -39,6 +39,28 @@ For more information, see
39
39
(Required, string)
40
40
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=calendar-id]
41
41
42
+ [[ml-get-calendar-event-query-parms]]
43
+ == {api-query-parms-title}
44
+
45
+ `end`::
46
+ (Optional, string) Specifies to get events with timestamps earlier than this
47
+ time.
48
+
49
+ `from`::
50
+ (Optional, integer) Skips the specified number of events. Defaults to `0`.
51
+
52
+ `job_id`::
53
+ (Optional, string) Specifies to get events for a specific {anomaly-job}
54
+ identifier or job group. It must be used with a calendar identifier of `_all`
55
+ or `*`.
56
+
57
+ `size`::
58
+ (Optional, integer) Specifies the maximum number of events to obtain. Defaults
59
+ to `100`.
60
+
61
+ `start`::
62
+ (Optional, string) Specifies to get events with timestamps after this time.
63
+
42
64
[[ml-get-calendar-event-request-body]]
43
65
== {api-request-body-title}
44
66
@@ -47,17 +69,22 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=calendar-id]
47
69
time. Defaults to unset, which means results are not
48
70
limited to specific timestamps.
49
71
50
- `from`::
72
+ `job_id`::
73
+ (Optional, string) Specifies to get events for a specific {anomaly-job}
74
+ identifier or job group. It must be used with a calendar identifier of `_all`
75
+ or `*`.
76
+
77
+ `page.from`::
51
78
(Optional, integer) Skips the specified number of events. Defaults to `0`.
52
79
53
- `size`::
80
+ `page. size`::
54
81
(Optional, integer) Specifies the maximum number of events to obtain.
55
82
Defaults to `100`.
56
83
57
84
`start`::
58
85
(Optional, string) Specifies to get events with timestamps after this time.
59
- Defaults to unset, which means results are not limited to
60
- specific timestamps.
86
+ Defaults to unset, which means results are not limited to specific
87
+ timestamps.
61
88
62
89
[[ml-get-calendar-event-results]]
63
90
== {api-response-body-title}
@@ -126,3 +153,12 @@ The API returns the following results:
126
153
// TESTRESPONSE[s/LS8LJGEBMTCMA-qz49st/$body.$_path/]
127
154
// TESTRESPONSE[s/Li8LJGEBMTCMA-qz49st/$body.$_path/]
128
155
// TESTRESPONSE[s/Ly8LJGEBMTCMA-qz49st/$body.$_path/]
156
+
157
+ The following example retrieves scheduled events that occur within a specific
158
+ period of time:
159
+
160
+ [source,console]
161
+ --------------------------------------------------
162
+ GET _ml/*/planned-outages/events?start=1635638400000&end=1635724800000
163
+ --------------------------------------------------
164
+ // TEST[skip:setup:calendar_outages_addevent]
0 commit comments