delete-calendar.asciidoc 996 B

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