2019-07-05 07:34:05 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="platinum"]
|
|
|
|
[[start-dfanalytics]]
|
2020-07-20 16:06:29 -04:00
|
|
|
= Start {dfanalytics-jobs} API
|
2019-07-05 07:34:05 -04:00
|
|
|
|
|
|
|
[subs="attributes"]
|
|
|
|
++++
|
|
|
|
<titleabbrev>Start {dfanalytics-jobs}</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
|
|
|
Starts a {dfanalytics-job}.
|
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
experimental[]
|
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-start-dfanalytics-request]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-request-title}
|
2019-07-05 07:34:05 -04:00
|
|
|
|
|
|
|
`POST _ml/data_frame/analytics/<data_frame_analytics_id>/_start`
|
|
|
|
|
|
|
|
[[ml-start-dfanalytics-prereq]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-prereq-title}
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2020-01-09 04:44:07 -05:00
|
|
|
If the {es} {security-features} are enabled, you must have the following built-in roles and privileges:
|
|
|
|
|
|
|
|
* `machine_learning_admin`
|
2020-04-13 13:43:52 -04:00
|
|
|
* source indices: `read`, `view_index_metadata`
|
2020-01-09 04:44:07 -05:00
|
|
|
* destination index: `read`, `create_index`, `manage` and `index`
|
2020-07-23 19:43:10 -04:00
|
|
|
|
|
|
|
For more information, see <<built-in-roles>>, <<security-privileges>>, and
|
|
|
|
{ml-docs-setup-privileges}.
|
2020-01-09 04:44:07 -05:00
|
|
|
|
2020-04-13 13:43:52 -04:00
|
|
|
[[ml-start-dfanalytics-desc]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-description-title}
|
2020-04-13 13:43:52 -04:00
|
|
|
|
|
|
|
A {dfanalytics-job} can be started and stopped multiple times throughout its
|
|
|
|
lifecycle.
|
|
|
|
|
|
|
|
If the destination index does not exist, it is created automatically the first
|
|
|
|
time you start the {dfanalytics-job}. The `index.number_of_shards` and
|
|
|
|
`index.number_of_replicas` settings for the destination index are copied from
|
|
|
|
the source index. If there are multiple source indices, the destination index
|
|
|
|
copies the highest setting values. The mappings for the destination index are
|
|
|
|
also copied from the source indices. If there are any mapping conflicts, the job
|
|
|
|
fails to start.
|
|
|
|
|
|
|
|
If the destination index exists, it is used as is. You can therefore set up the
|
|
|
|
destination index in advance with custom settings and mappings.
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2020-04-29 19:29:38 -04:00
|
|
|
IMPORTANT: When {es} {security-features} are enabled, the {dfanalytics-job}
|
|
|
|
remembers which user created it and runs the job using those credentials. If you
|
|
|
|
provided <<http-clients-secondary-authorization,secondary authorization headers>>
|
|
|
|
when you created the job, those credentials are used.
|
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-start-dfanalytics-path-params]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-path-parms-title}
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`<data_frame_analytics_id>`::
|
2019-12-13 05:48:21 -05:00
|
|
|
(Required, string)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=job-id-data-frame-analytics-define]
|
2019-07-10 20:58:17 -04:00
|
|
|
|
|
|
|
[[ml-start-dfanalytics-query-params]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-query-parms-title}
|
2019-07-12 11:26:31 -04:00
|
|
|
|
|
|
|
`timeout`::
|
2019-12-13 05:48:21 -05:00
|
|
|
(Optional, <<time-units,time units>>)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=timeout-start]
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2020-04-22 07:06:53 -04:00
|
|
|
[[ml-start-dfanalytics-response-body]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-response-body-title}
|
2020-04-22 07:06:53 -04:00
|
|
|
|
|
|
|
`acknowledged`::
|
|
|
|
(boolean) For a successful response, this value is always `true`. On failure, an
|
|
|
|
exception is returned instead.
|
|
|
|
|
|
|
|
`node`::
|
|
|
|
(string) The ID of the node that the job was started on.
|
|
|
|
If the job is allowed to open lazily and has not yet been assigned to a node, this value is an empty string.
|
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-start-dfanalytics-example]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-examples-title}
|
2019-07-05 07:34:05 -04:00
|
|
|
|
|
|
|
The following example starts the `loganalytics` {dfanalytics-job}:
|
|
|
|
|
2019-09-09 12:35:50 -04:00
|
|
|
[source,console]
|
2019-07-05 07:34:05 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
POST _ml/data_frame/analytics/loganalytics/_start
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[skip:setup:logdata_job]
|
|
|
|
|
|
|
|
When the {dfanalytics-job} starts, you receive the following results:
|
|
|
|
|
2019-09-06 09:22:08 -04:00
|
|
|
[source,console-result]
|
2019-07-05 07:34:05 -04:00
|
|
|
----
|
|
|
|
{
|
2020-04-22 07:06:53 -04:00
|
|
|
"acknowledged" : true,
|
|
|
|
"node" : "node-1"
|
2019-07-05 07:34:05 -04:00
|
|
|
}
|
|
|
|
----
|