Get info about events in calendars
Generally available; Added in 6.2.0
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.
GET
/_ml/calendars/{calendar_id}/events
Console
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"