delete-calendar-event.asciidoc 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. [role="xpack"]
  2. [[ml-delete-calendar-event]]
  3. = Delete events from calendar API
  4. ++++
  5. <titleabbrev>Delete events from calendar</titleabbrev>
  6. ++++
  7. Deletes scheduled events from a calendar.
  8. [[ml-delete-calendar-event-request]]
  9. == {api-request-title}
  10. `DELETE _ml/calendars/<calendar_id>/events/<event_id>`
  11. [[ml-delete-calendar-event-prereqs]]
  12. == {api-prereq-title}
  13. Requires the `manage_ml` cluster privilege. This privilege is included in the
  14. `machine_learning_admin` built-in role.
  15. [[ml-delete-calendar-event-desc]]
  16. == {api-description-title}
  17. This API removes individual events from a calendar. To remove all scheduled
  18. events and delete the calendar, see the
  19. <<ml-delete-calendar,delete calendar API>>.
  20. [[ml-delete-calendar-event-path-parms]]
  21. == {api-path-parms-title}
  22. `<calendar_id>`::
  23. (Required, string)
  24. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=calendar-id]
  25. `<event_id>`::
  26. (Required, string) Identifier for the scheduled event. You can obtain this
  27. identifier by using the <<ml-get-calendar-event,get calendar events API>>.
  28. [[ml-delete-calendar-event-example]]
  29. == {api-examples-title}
  30. [source,console]
  31. --------------------------------------------------
  32. DELETE _ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st
  33. --------------------------------------------------
  34. // TEST[skip:catch:missing]
  35. When the event is removed, you receive the following results:
  36. [source,js]
  37. ----
  38. {
  39. "acknowledged": true
  40. }
  41. ----