2017-12-21 05:52:58 +08:00
|
|
|
[role="xpack"]
|
|
|
|
[[ml-put-calendar-job]]
|
2020-07-21 03:38:09 +08:00
|
|
|
= Add {anomaly-jobs} to calendar API
|
2017-12-21 05:52:58 +08:00
|
|
|
++++
|
2018-12-21 02:23:28 +08:00
|
|
|
<titleabbrev>Add jobs to calendar</titleabbrev>
|
2017-12-21 05:52:58 +08:00
|
|
|
++++
|
|
|
|
|
2019-07-26 02:20:42 +08:00
|
|
|
Adds an {anomaly-job} to a calendar.
|
2017-12-21 05:52:58 +08:00
|
|
|
|
2019-06-28 00:42:47 +08:00
|
|
|
[[ml-put-calendar-job-request]]
|
2020-07-21 03:38:09 +08:00
|
|
|
== {api-request-title}
|
2017-12-21 05:52:58 +08:00
|
|
|
|
2018-12-08 04:34:11 +08:00
|
|
|
`PUT _ml/calendars/<calendar_id>/jobs/<job_id>`
|
2017-12-21 05:52:58 +08:00
|
|
|
|
2019-06-28 04:58:42 +08:00
|
|
|
[[ml-put-calendar-job-prereqs]]
|
2020-07-21 03:38:09 +08:00
|
|
|
== {api-prereq-title}
|
2019-06-28 04:58:42 +08:00
|
|
|
|
2021-05-03 16:20:14 +08:00
|
|
|
Requires the `manage_ml` cluster privilege. This privilege is included in the
|
|
|
|
`machine_learning_admin` built-in role.
|
2019-06-28 04:58:42 +08:00
|
|
|
|
2019-06-28 00:42:47 +08:00
|
|
|
[[ml-put-calendar-job-path-parms]]
|
2020-07-21 03:38:09 +08:00
|
|
|
== {api-path-parms-title}
|
2017-12-21 05:52:58 +08:00
|
|
|
|
2019-07-12 23:26:31 +08:00
|
|
|
`<calendar_id>`::
|
2020-01-03 02:59:54 +08:00
|
|
|
(Required, string)
|
2020-06-02 02:46:10 +08:00
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=calendar-id]
|
2017-12-21 05:52:58 +08:00
|
|
|
|
2019-07-12 23:26:31 +08:00
|
|
|
`<job_id>`::
|
2019-12-07 07:32:07 +08:00
|
|
|
(Required, string)
|
2020-06-02 02:46:10 +08:00
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection-list]
|
2017-12-21 05:52:58 +08:00
|
|
|
|
2019-06-28 00:42:47 +08:00
|
|
|
[[ml-put-calendar-job-example]]
|
2020-07-21 03:38:09 +08:00
|
|
|
== {api-examples-title}
|
2018-01-25 00:14:23 +08:00
|
|
|
|
2019-09-06 22:55:16 +08:00
|
|
|
[source,console]
|
2018-01-25 00:14:23 +08:00
|
|
|
--------------------------------------------------
|
2018-12-08 04:34:11 +08:00
|
|
|
PUT _ml/calendars/planned-outages/jobs/total-requests
|
2018-01-25 00:14:23 +08:00
|
|
|
--------------------------------------------------
|
2018-09-01 07:49:24 +08:00
|
|
|
// TEST[skip:setup:calendar_outages_openjob]
|
2018-01-25 00:14:23 +08:00
|
|
|
|
|
|
|
The API returns the following results:
|
|
|
|
|
2019-09-06 04:47:18 +08:00
|
|
|
[source,console-result]
|
2018-01-25 00:14:23 +08:00
|
|
|
----
|
|
|
|
{
|
|
|
|
"calendar_id": "planned-outages",
|
|
|
|
"job_ids": [
|
|
|
|
"total-requests"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
----
|