Get info about events in calendars Generally available; Added in 6.2.0

GET /_ml/calendars/{calendar_id}/events

Required authorization

  • Cluster privileges: monitor_ml

Path parameters

  • calendar_id string Required

    A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using _all or * or by omitting the calendar identifier.

Query parameters

  • end string | number

    Specifies to get events with timestamps earlier than this time.

  • from number

    Skips the specified number of events.

  • job_id string

    Specifies to get events for a specific anomaly detection job identifier or job group. It must be used with a calendar identifier of _all or *.

  • size number

    Specifies the maximum number of events to obtain.

  • start string | number

    Specifies to get events with timestamps after this time.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • count number Required
    • events array[object] Required
      Hide events attributes Show events attributes object
      • calendar_id string

        A string that uniquely identifies a calendar.

      • event_id string
      • description string Required

        A description of the scheduled event.

      • end_time string | number

        The timestamp for the end of the scheduled event in milliseconds since the epoch or ISO 8601 format.

        One of:

        The timestamp for the end of the scheduled event in milliseconds since the epoch or ISO 8601 format.

        The timestamp for the end of the scheduled event in milliseconds since the epoch or ISO 8601 format.

      • start_time string | number

        The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format.

        One of:

        The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format.

        The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format.

      • skip_result boolean

        When true the model will not create results for this calendar period.

        Default value is true.

      • skip_model_update boolean

        When true the model will not be updated for this calendar period.

        Default value is true.

      • force_time_shift number

        Shift time by this many seconds. For example adjust time for daylight savings changes

GET /_ml/calendars/{calendar_id}/events
GET _ml/calendars/planned-outages/events
resp = client.ml.get_calendar_events(
    calendar_id="planned-outages",
)
const response = await client.ml.getCalendarEvents({
  calendar_id: "planned-outages",
});
response = client.ml.get_calendar_events(
  calendar_id: "planned-outages"
)
$resp = $client->ml()->getCalendarEvents([
    "calendar_id" => "planned-outages",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/calendars/planned-outages/events"
client.ml().getCalendarEvents(g -> g
    .calendarId("planned-outages")
);