2018-10-05 11:45:46 -04:00
|
|
|
--
|
|
|
|
:api: start-datafeed
|
|
|
|
:request: StartDatafeedRequest
|
|
|
|
:response: StartDatafeedResponse
|
|
|
|
--
|
2019-09-10 11:26:56 -04:00
|
|
|
[role="xpack"]
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}"]
|
2020-04-22 07:06:53 -04:00
|
|
|
=== Start {dfeed} API
|
2018-09-21 08:56:38 -04:00
|
|
|
|
2020-04-22 07:06:53 -04:00
|
|
|
Starts a {ml} {dfeed} in the cluster. It accepts a +{request}+ object and
|
2019-07-26 13:47:03 -04:00
|
|
|
responds with a +{response}+ object.
|
2018-09-21 08:56:38 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-request"]
|
2020-04-22 07:06:53 -04:00
|
|
|
==== Start {dfeed} request
|
2018-09-21 08:56:38 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
A +{request}+ object is created referencing a non-null `datafeedId`.
|
2018-09-21 08:56:38 -04:00
|
|
|
All other fields are optional for the request.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
2018-09-21 08:56:38 -04:00
|
|
|
--------------------------------------------------
|
2019-07-26 13:47:03 -04:00
|
|
|
<1> Constructing a new request referencing an existing `datafeedId`.
|
2018-09-21 08:56:38 -04:00
|
|
|
|
2019-07-26 13:47:03 -04:00
|
|
|
==== Optional arguments
|
2018-09-21 08:56:38 -04:00
|
|
|
|
|
|
|
The following arguments are optional.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request-options]
|
2018-09-21 08:56:38 -04:00
|
|
|
--------------------------------------------------
|
2020-04-22 07:06:53 -04:00
|
|
|
<1> Set when the {dfeed} should end, the value is exclusive.
|
2018-09-21 08:56:38 -04:00
|
|
|
May be an epoch seconds, epoch millis or an ISO 8601 string.
|
|
|
|
"now" is a special value that indicates the current time.
|
2020-04-22 07:06:53 -04:00
|
|
|
If you do not specify an end time, the {dfeed} runs continuously.
|
|
|
|
<2> Set when the {dfeed} should start, the value is inclusive.
|
2018-09-21 08:56:38 -04:00
|
|
|
May be an epoch seconds, epoch millis or an ISO 8601 string.
|
2020-04-22 07:06:53 -04:00
|
|
|
If you do not specify a start time and the {dfeed} is associated with a new job,
|
2018-09-21 08:56:38 -04:00
|
|
|
the analysis starts from the earliest time for which data is available.
|
|
|
|
<3> Set the timeout for the request
|
|
|
|
|
2020-04-22 07:06:53 -04:00
|
|
|
[id="{upid}-{api}-response"]
|
|
|
|
==== Start {dfeed} response
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
|
|
|
--------------------------------------------------
|
|
|
|
<1> `isStarted()` from the +{response}+ is always `true` if the {dfeed} was
|
|
|
|
started successfully. (An exception would be thrown instead if the {dfeed}
|
|
|
|
was not started successfully.)
|
|
|
|
<2> `getNode()` returns the node that the {dfeed} was assigned to. If the
|
|
|
|
{dfeed} is allowed to open lazily and has not yet been assigned to a node
|
|
|
|
then an empty string is returned. If `getNode()` returns `null` then
|
|
|
|
the server is an old version that does not return node information.
|
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
include::../execution.asciidoc[]
|