put-calendar.asciidoc 1.1 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. ==== Request
  10. `PUT _xpack/ml/calendars/<calendar_id>`
  11. ===== Description
  12. For more information, see
  13. {xpack-ref}/ml-calendars.html[Calendars and Scheduled Events].
  14. ==== Path Parameters
  15. `calendar_id` (required)::
  16. (string) Identifier for the calendar.
  17. ==== Request Body
  18. `description`::
  19. (string) A description of the calendar.
  20. ==== Authorization
  21. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  22. For more information, see
  23. {xpack-ref}/security-privileges.html[Security Privileges].
  24. ==== Examples
  25. The following example creates the `planned-outages` calendar:
  26. [source,js]
  27. --------------------------------------------------
  28. PUT _xpack/ml/calendars/planned-outages
  29. --------------------------------------------------
  30. // CONSOLE
  31. // TEST[skip:need-license]
  32. When the calendar is created, you receive the following results:
  33. [source,js]
  34. ----
  35. {
  36. "calendar_id": "planned-outages",
  37. "job_ids": []
  38. }
  39. ----
  40. // TESTRESPONSE