delete-calendar-job.asciidoc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. <<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)
  23. include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection-list]
  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,console]
  29. --------------------------------------------------
  30. DELETE _ml/calendars/planned-outages/jobs/total-requests
  31. --------------------------------------------------
  32. // TEST[skip:setup:calendar_outages_addjob]
  33. When the job is removed from the calendar, you receive the following
  34. results:
  35. [source,console-result]
  36. ----
  37. {
  38. "calendar_id": "planned-outages",
  39. "job_ids": []
  40. }
  41. ----