delete-calendar-job.asciidoc 1.3 KB

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