59 lines
1.1 KiB
Plaintext
59 lines
1.1 KiB
Plaintext
[role="xpack"]
|
|
[testenv="platinum"]
|
|
[[ml-put-calendar]]
|
|
=== Create calendar API
|
|
++++
|
|
<titleabbrev>Create calendar</titleabbrev>
|
|
++++
|
|
|
|
Instantiates a calendar.
|
|
|
|
==== Request
|
|
|
|
`PUT _ml/calendars/<calendar_id>`
|
|
|
|
===== Description
|
|
|
|
For more information, see
|
|
{xpack-ref}/ml-calendars.html[Calendars and Scheduled Events].
|
|
|
|
==== Path Parameters
|
|
|
|
`calendar_id` (required)::
|
|
(string) Identifier for the calendar.
|
|
|
|
|
|
==== Request Body
|
|
|
|
`description`::
|
|
(string) A description of the calendar.
|
|
|
|
|
|
==== Authorization
|
|
|
|
You must have `manage_ml`, or `manage` cluster privileges to use this API.
|
|
For more information, see
|
|
{xpack-ref}/security-privileges.html[Security Privileges].
|
|
|
|
|
|
==== Examples
|
|
|
|
The following example creates the `planned-outages` calendar:
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
PUT _ml/calendars/planned-outages
|
|
--------------------------------------------------
|
|
// CONSOLE
|
|
// TEST[skip:need-license]
|
|
|
|
When the calendar is created, you receive the following results:
|
|
[source,js]
|
|
----
|
|
{
|
|
"calendar_id": "planned-outages",
|
|
"job_ids": []
|
|
}
|
|
----
|
|
// TESTRESPONSE
|