Delete calendars API

Delete calendars API

New API reference

For the most up-to-date API details, refer to Machine learning anomaly detection APIs.

Deletes a calendar.

Request

DELETE _ml/calendars/<calendar_id>

Prerequisites

Requires the manage_ml cluster privilege. This privilege is included in the machine_learning_admin built-in role.

Description

This API removes all scheduled events from the calendar then deletes the calendar.

Path parameters

<calendar_id>

(Required, string) A string that uniquely identifies a calendar.

Examples

  1. resp = client.ml.delete_calendar(
  2. calendar_id="planned-outages",
  3. )
  4. print(resp)
  1. response = client.ml.delete_calendar(
  2. calendar_id: 'planned-outages'
  3. )
  4. puts response
  1. const response = await client.ml.deleteCalendar({
  2. calendar_id: "planned-outages",
  3. });
  4. console.log(response);
  1. DELETE _ml/calendars/planned-outages

When the calendar is deleted, you receive the following results:

  1. {
  2. "acknowledged": true
  3. }