delete-calendar-job.asciidoc 1.2 KB

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