delete-calendar-job.asciidoc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. Requires the `manage_ml` cluster privilege. This privilege is included in the
  15. `machine_learning_admin` built-in role.
  16. [[ml-delete-calendar-job-path-parms]]
  17. == {api-path-parms-title}
  18. `<calendar_id>`::
  19. (Required, string)
  20. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=calendar-id]
  21. `<job_id>`::
  22. (Required, string)
  23. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection-list]
  24. [[ml-delete-calendar-job-example]]
  25. == {api-examples-title}
  26. [source,console]
  27. --------------------------------------------------
  28. DELETE _ml/calendars/planned-outages/jobs/total-requests
  29. --------------------------------------------------
  30. // TEST[skip:setup:calendar_outages_addjob]
  31. When the job is removed from the calendar, you receive the following
  32. results:
  33. [source,console-result]
  34. ----
  35. {
  36. "calendar_id": "planned-outages",
  37. "job_ids": []
  38. }
  39. ----