put-calendar.asciidoc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. * If the {es} {security-features} are enabled, you must have `manage_ml` or
  15. `manage` cluster privileges to use this API. See
  16. <<security-privileges>> and {ml-docs-setup-privileges}.
  17. [[ml-put-calendar-desc]]
  18. == {api-description-title}
  19. For more information, see
  20. {ml-docs}/ml-calendars.html[Calendars and scheduled events].
  21. [[ml-put-calendar-path-parms]]
  22. == {api-path-parms-title}
  23. `<calendar_id>`::
  24. (Required, string)
  25. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=calendar-id]
  26. [[ml-put-calendar-request-body]]
  27. == {api-request-body-title}
  28. `description`::
  29. (Optional, string) A description of the calendar.
  30. [[ml-put-calendar-example]]
  31. == {api-examples-title}
  32. [source,console]
  33. --------------------------------------------------
  34. PUT _ml/calendars/planned-outages
  35. --------------------------------------------------
  36. // TEST[skip:need-license]
  37. When the calendar is created, you receive the following results:
  38. [source,console-result]
  39. ----
  40. {
  41. "calendar_id": "planned-outages",
  42. "job_ids": []
  43. }
  44. ----