put-calendar.asciidoc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. [role="xpack"]
  2. [[ml-put-calendar]]
  3. = Create calendars API
  4. ++++
  5. <titleabbrev>Create calendars</titleabbrev>
  6. ++++
  7. Instantiates a calendar.
  8. [[ml-put-calendar-request]]
  9. == {api-request-title}
  10. `PUT _ml/calendars/<calendar_id>`
  11. [[ml-put-calendar-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-put-calendar-desc]]
  16. == {api-description-title}
  17. For more information, see
  18. {ml-docs}/ml-ad-run-jobs.html#ml-ad-calendars[Calendars and scheduled events].
  19. [[ml-put-calendar-path-parms]]
  20. == {api-path-parms-title}
  21. `<calendar_id>`::
  22. (Required, string)
  23. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=calendar-id]
  24. [[ml-put-calendar-request-body]]
  25. == {api-request-body-title}
  26. `description`::
  27. (Optional, string) A description of the calendar.
  28. [[ml-put-calendar-example]]
  29. == {api-examples-title}
  30. [source,console]
  31. --------------------------------------------------
  32. PUT _ml/calendars/planned-outages
  33. --------------------------------------------------
  34. // TEST[skip:need-license]
  35. When the calendar is created, you receive the following results:
  36. [source,console-result]
  37. ----
  38. {
  39. "calendar_id": "planned-outages",
  40. "job_ids": []
  41. }
  42. ----