delete-calendar-event.asciidoc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. ==== Request
  10. `DELETE _xpack/ml/calendars/<calendar_id>/events/<event_id>`
  11. ==== Description
  12. This API removes individual events from a calendar. To remove all scheduled
  13. events and delete the calendar, see the
  14. <<ml-delete-calendar,delete calendar API>>.
  15. ==== Path Parameters
  16. `calendar_id`(required)::
  17. (string) Identifier for the calendar.
  18. `event_id` (required)::
  19. (string) Identifier for the scheduled event. You can obtain this identifier
  20. by using the <<ml-get-calendar-event,get calendar events API>>.
  21. ==== Authorization
  22. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  23. For more information, see {xpack-ref}/security-privileges.html[Security Privileges].
  24. ==== Examples
  25. The following example deletes a scheduled event from the `planned-outages`
  26. calendar:
  27. [source,js]
  28. --------------------------------------------------
  29. DELETE _xpack/ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st
  30. --------------------------------------------------
  31. // CONSOLE
  32. // TEST[skip:catch:missing]
  33. When the event is removed, you receive the following results:
  34. [source,js]
  35. ----
  36. {
  37. "acknowledged": true
  38. }
  39. ----