1
0

delete-calendar-event.asciidoc 1.3 KB

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