put-calendar.asciidoc 1.3 KB

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