Skip to content

Commit 678e82d

Browse files
authored
[6.8] [DOCS] Fixes ML get scheduled events API (#78809) (#78847)
1 parent 80ceefe commit 678e82d

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

docs/reference/ml/apis/get-calendar-event.asciidoc

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,25 @@ calendars by using `_all`.
2727
`calendar_id` (required)::
2828
(string) Identifier for the calendar.
2929

30-
==== Request Body
30+
==== Query Parameters
3131

3232
`end`::
33-
(string) Specifies to get events with timestamps earlier than this time.
33+
(Optional, string) Specifies to get events with timestamps earlier than this
34+
time.
3435

3536
`from`::
36-
(integer) Skips the specified number of events.
37+
(Optional, integer) Skips the specified number of events. Defaults to `0`.
38+
39+
`job_id`::
40+
(Optional, string) Specifies to get events for a specific {anomaly-job}
41+
identifier or job group. It must be used with a calendar identifier of `_all`.
3742

3843
`size`::
39-
(integer) Specifies the maximum number of events to obtain.
44+
(Optional, integer) Specifies the maximum number of events to obtain. Defaults
45+
to `100`.
4046

4147
`start`::
42-
(string) Specifies to get events with timestamps after this time.
48+
(Optional, string) Specifies to get events with timestamps after this time.
4349

4450
==== Results
4551

@@ -105,3 +111,12 @@ The API returns the following results:
105111
// TESTRESPONSE[s/Ly8LJGEBMTCMA-qz49st/$body.$_path/]
106112

107113
For more information about these properties, see <<ml-event-resource>>.
114+
115+
The following example retrieves scheduled events that occur within a specific
116+
period of time:
117+
118+
[source,console]
119+
--------------------------------------------------
120+
GET _xpack/ml/calendars/planned-outages/events?start=1635638400000&end=1635724800000
121+
--------------------------------------------------
122+
// TEST[skip:setup:calendar_outages_addevent]

0 commit comments

Comments
 (0)