delete-calendar-job.asciidoc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-delete-calendar-job]]
  4. === Delete jobs from calendar API
  5. ++++
  6. <titleabbrev>Delete jobs from calendar</titleabbrev>
  7. ++++
  8. Deletes jobs from a calendar.
  9. ==== Request
  10. `DELETE _ml/calendars/<calendar_id>/jobs/<job_id>`
  11. ==== Path Parameters
  12. `calendar_id`(required)::
  13. (string) Identifier for the calendar.
  14. `job_id` (required)::
  15. (string) An identifier for the job. It can be a job identifier, a group name, or a
  16. comma-separated list of jobs or groups.
  17. ==== Authorization
  18. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  19. For more information, see {xpack-ref}/security-privileges.html[Security Privileges].
  20. ==== Examples
  21. The following example removes the association between the `planned-outages`
  22. calendar and `total-requests` job:
  23. [source,js]
  24. --------------------------------------------------
  25. DELETE _ml/calendars/planned-outages/jobs/total-requests
  26. --------------------------------------------------
  27. // CONSOLE
  28. // TEST[skip:setup:calendar_outages_addjob]
  29. When the job is removed from the calendar, you receive the following
  30. results:
  31. [source,js]
  32. ----
  33. {
  34. "calendar_id": "planned-outages",
  35. "job_ids": []
  36. }
  37. ----
  38. // TESTRESPONSE