Skip to content

[6.8] [DOCS] Fixes ML get scheduled events API (#78809) #78847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions docs/reference/ml/apis/get-calendar-event.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,25 @@ calendars by using `_all`.
`calendar_id` (required)::
(string) Identifier for the calendar.

==== Request Body
==== Query Parameters

`end`::
(string) Specifies to get events with timestamps earlier than this time.
(Optional, string) Specifies to get events with timestamps earlier than this
time.

`from`::
(integer) Skips the specified number of events.
(Optional, integer) Skips the specified number of events. Defaults to `0`.

`job_id`::
(Optional, string) Specifies to get events for a specific {anomaly-job}
identifier or job group. It must be used with a calendar identifier of `_all`.

`size`::
(integer) Specifies the maximum number of events to obtain.
(Optional, integer) Specifies the maximum number of events to obtain. Defaults
to `100`.

`start`::
(string) Specifies to get events with timestamps after this time.
(Optional, string) Specifies to get events with timestamps after this time.

==== Results

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

For more information about these properties, see <<ml-event-resource>>.

The following example retrieves scheduled events that occur within a specific
period of time:

[source,console]
--------------------------------------------------
GET _xpack/ml/calendars/planned-outages/events?start=1635638400000&end=1635724800000
--------------------------------------------------
// TEST[skip:setup:calendar_outages_addevent]