delete-calendar.asciidoc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-delete-calendar]]
  4. === Delete calendar API
  5. ++++
  6. <titleabbrev>Delete calendar</titleabbrev>
  7. ++++
  8. Deletes a calendar.
  9. [[ml-delete-calendar-request]]
  10. ==== {api-request-title}
  11. `DELETE _ml/calendars/<calendar_id>`
  12. [[ml-delete-calendar-desc]]
  13. ==== {api-description-title}
  14. This API removes all scheduled events from the calendar then deletes the
  15. calendar.
  16. [[ml-delete-calendar-path-parms]]
  17. ==== {api-path-parms-title}
  18. `calendar_id` (required)::
  19. (string) Identifier for the calendar.
  20. [[ml-delete-calendar-prereqs]]
  21. ==== {api-prereq-title}
  22. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  23. For more information, see {stack-ov}/security-privileges.html[Security privileges].
  24. [[ml-delete-calendar-example]]
  25. ==== {api-examples-title}
  26. The following example deletes the `planned-outages` calendar:
  27. [source,js]
  28. --------------------------------------------------
  29. DELETE _ml/calendars/planned-outages
  30. --------------------------------------------------
  31. // CONSOLE
  32. // TEST[skip:setup:calendar_outages]
  33. When the calendar is deleted, you receive the following results:
  34. [source,js]
  35. ----
  36. {
  37. "acknowledged": true
  38. }
  39. ----
  40. // TESTRESPONSE