delete-calendar-job.asciidoc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. [role="xpack"]
  2. [[ml-delete-calendar-job]]
  3. = Delete {anomaly-jobs} from calendar API
  4. ++++
  5. <titleabbrev>Delete jobs from calendar</titleabbrev>
  6. ++++
  7. Deletes {anomaly-jobs} from a calendar.
  8. [[ml-delete-calendar-job-request]]
  9. == {api-request-title}
  10. `DELETE _ml/calendars/<calendar_id>/jobs/<job_id>`
  11. [[ml-delete-calendar-job-prereqs]]
  12. == {api-prereq-title}
  13. Requires the `manage_ml` cluster privilege. This privilege is included in the
  14. `machine_learning_admin` built-in role.
  15. [[ml-delete-calendar-job-path-parms]]
  16. == {api-path-parms-title}
  17. `<calendar_id>`::
  18. (Required, string)
  19. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=calendar-id]
  20. `<job_id>`::
  21. (Required, string)
  22. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection-list]
  23. [[ml-delete-calendar-job-example]]
  24. == {api-examples-title}
  25. [source,console]
  26. --------------------------------------------------
  27. DELETE _ml/calendars/planned-outages/jobs/total-requests
  28. --------------------------------------------------
  29. // TEST[skip:setup:calendar_outages_addjob]
  30. When the job is removed from the calendar, you receive the following
  31. results:
  32. [source,console-result]
  33. ----
  34. {
  35. "calendar_id": "planned-outages",
  36. "job_ids": []
  37. }
  38. ----