delete-calendar-event.asciidoc 1.4 KB

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