put-calendar.asciidoc 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-put-calendar]]
  4. = Create calendars API
  5. ++++
  6. <titleabbrev>Create calendars</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. Requires the `manage_ml` cluster privilege. This privilege is included in the
  15. `machine_learning_admin` built-in role.
  16. [[ml-put-calendar-desc]]
  17. == {api-description-title}
  18. For more information, see
  19. {ml-docs}/ml-calendars.html[Calendars and scheduled events].
  20. [[ml-put-calendar-path-parms]]
  21. == {api-path-parms-title}
  22. `<calendar_id>`::
  23. (Required, string)
  24. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=calendar-id]
  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. ----