Skip to content

Commit

Permalink
[DOCS] Fixes ML get scheduled events API (elastic#78809)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed Oct 7, 2021
1 parent c859302 commit fbee380
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions docs/reference/ml/apis/get-calendar-event.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,42 @@ calendars by using `_all`.
`calendar_id` (required)::
(string) Identifier for the calendar.

==== Query Parameters

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

`from`::
(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`
or `*`.

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

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


==== Request Body

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

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

`page.from`::
(integer) Skips the specified number of events.

`size`::
`page.size`::
(integer) Specifies the maximum number of events to obtain.

`start`::
Expand Down Expand Up @@ -105,3 +132,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 _ml/*/planned-outages/events?start=1635638400000&end=1635724800000
--------------------------------------------------
// TEST[skip:setup:calendar_outages_addevent]

0 comments on commit fbee380

Please sign in to comment.