put-calendar.asciidoc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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-desc]]
  13. ==== {api-description-title}
  14. For more information, see
  15. {stack-ov}/ml-calendars.html[Calendars and Scheduled Events].
  16. [[ml-put-calendar-path-parms]]
  17. ==== {api-path-parms-title}
  18. `calendar_id` (required)::
  19. (string) Identifier for the calendar.
  20. [[ml-put-calendar-request-body]]
  21. ==== {api-request-body-title}
  22. `description`::
  23. (string) A description of the calendar.
  24. [[ml-put-calendar-prereqs]]
  25. ==== {api-prereq-title}
  26. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  27. For more information, see
  28. {stack-ov}/security-privileges.html[Security privileges].
  29. [[ml-put-calendar-example]]
  30. ==== {api-examples-title}
  31. The following example creates the `planned-outages` calendar:
  32. [source,js]
  33. --------------------------------------------------
  34. PUT _ml/calendars/planned-outages
  35. --------------------------------------------------
  36. // CONSOLE
  37. // TEST[skip:need-license]
  38. When the calendar is created, you receive the following results:
  39. [source,js]
  40. ----
  41. {
  42. "calendar_id": "planned-outages",
  43. "job_ids": []
  44. }
  45. ----
  46. // TESTRESPONSE