delete-calendar.asciidoc 981 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. [role="xpack"]
  2. [[ml-delete-calendar]]
  3. === Delete Calendar API
  4. ++++
  5. <titleabbrev>Delete Calendar</titleabbrev>
  6. ++++
  7. Deletes a calendar.
  8. ==== Request
  9. `DELETE _xpack/ml/calendars/<calendar_id>`
  10. ==== Description
  11. This API removes all scheduled events from the calendar then deletes the
  12. calendar.
  13. ==== Path Parameters
  14. `calendar_id` (required)::
  15. (string) Identifier for the calendar.
  16. ==== Authorization
  17. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  18. For more information, see {xpack-ref}/security-privileges.html[Security Privileges].
  19. ==== Examples
  20. The following example deletes the `planned-outages` calendar:
  21. [source,js]
  22. --------------------------------------------------
  23. DELETE _xpack/ml/calendars/planned-outages
  24. --------------------------------------------------
  25. // CONSOLE
  26. // TEST[setup:calendar_outages]
  27. When the calendar is deleted, you receive the following results:
  28. [source,js]
  29. ----
  30. {
  31. "acknowledged": true
  32. }
  33. ----
  34. //TESTRESPONSE