delete-calendar-job.asciidoc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-delete-calendar-job]]
  4. === Delete {anomaly-jobs} from calendar API
  5. ++++
  6. <titleabbrev>Delete jobs from calendar</titleabbrev>
  7. ++++
  8. Deletes {anomaly-jobs} from a calendar.
  9. [[ml-delete-calendar-job-request]]
  10. ==== {api-request-title}
  11. `DELETE _ml/calendars/<calendar_id>/jobs/<job_id>`
  12. [[ml-delete-calendar-job-prereqs]]
  13. ==== {api-prereq-title}
  14. * If the {es} {security-features} are enabled, you must have `manage_ml` or
  15. `manage` cluster privileges to use this API. See
  16. {stack-ov}/security-privileges.html[Security privileges].
  17. [[ml-delete-calendar-job-path-parms]]
  18. ==== {api-path-parms-title}
  19. `<calendar_id>`::
  20. (Required, string) Identifier for the calendar.
  21. `<job_id>`::
  22. (Required, string) An identifier for the {anomaly-jobs}. It can be a job
  23. identifier, a group name, or a comma-separated list of jobs or groups.
  24. [[ml-delete-calendar-job-example]]
  25. ==== {api-examples-title}
  26. The following example removes the association between the `planned-outages`
  27. calendar and `total-requests` job:
  28. [source,js]
  29. --------------------------------------------------
  30. DELETE _ml/calendars/planned-outages/jobs/total-requests
  31. --------------------------------------------------
  32. // CONSOLE
  33. // TEST[skip:setup:calendar_outages_addjob]
  34. When the job is removed from the calendar, you receive the following
  35. results:
  36. [source,console-result]
  37. ----
  38. {
  39. "calendar_id": "planned-outages",
  40. "job_ids": []
  41. }
  42. ----