2018-10-26 17:44:12 -04:00
|
|
|
--
|
|
|
|
:api: update-datafeed
|
|
|
|
:request: UpdateDatafeedRequest
|
|
|
|
:response: PutDatafeedResponse
|
|
|
|
--
|
2019-09-10 11:26:56 -04:00
|
|
|
[role="xpack"]
|
2018-10-26 17:44:12 -04:00
|
|
|
[id="{upid}-{api}"]
|
2020-10-02 17:01:01 -04:00
|
|
|
=== Update datafeeds API
|
2018-10-26 17:44:12 -04:00
|
|
|
|
2019-07-26 13:47:03 -04:00
|
|
|
Updates a {ml} datafeed in the cluster. The API accepts a +{request}+ object
|
2018-10-26 17:44:12 -04:00
|
|
|
as a request and returns a +{response}+.
|
|
|
|
|
|
|
|
[id="{upid}-{api}-request"]
|
2020-10-02 17:01:01 -04:00
|
|
|
==== Update datafeeds request
|
2018-10-26 17:44:12 -04:00
|
|
|
|
|
|
|
A +{request}+ requires the following argument:
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
|
|
|
--------------------------------------------------
|
|
|
|
<1> The updated configuration of the {ml} datafeed
|
|
|
|
|
|
|
|
[id="{upid}-{api}-config"]
|
2020-10-02 17:01:01 -04:00
|
|
|
==== Updated datafeeds arguments
|
2018-10-26 17:44:12 -04:00
|
|
|
|
|
|
|
A `DatafeedUpdate` requires an existing non-null `datafeedId` and
|
|
|
|
allows updating various settings.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
|
|
|
include-tagged::{doc-tests-file}[{api}-config]
|
|
|
|
--------------------------------------------------
|
2019-07-26 13:47:03 -04:00
|
|
|
<1> Mandatory, non-null `datafeedId` referencing an existing {ml} datafeed.
|
|
|
|
<2> Optional, set the datafeed aggregations for data gathering.
|
|
|
|
<3> Optional, the indices that contain the data to retrieve and feed into the
|
|
|
|
{anomaly-job}.
|
2018-10-26 17:44:12 -04:00
|
|
|
<4> Optional, specifies how data searches are split into time chunks.
|
2019-07-26 13:47:03 -04:00
|
|
|
<5> Optional, the interval at which scheduled queries are made while the
|
|
|
|
datafeed runs in real time.
|
|
|
|
<6> Optional, a query to filter the search results by. Defaults to the
|
|
|
|
`match_all` query.
|
2018-10-26 17:44:12 -04:00
|
|
|
<7> Optional, the time interval behind real time that data is queried.
|
|
|
|
<8> Optional, allows the use of script fields.
|
|
|
|
<9> Optional, the `size` parameter used in the searches.
|
|
|
|
|
|
|
|
include::../execution.asciidoc[]
|
|
|
|
|
|
|
|
[id="{upid}-{api}-response"]
|
|
|
|
==== Response
|
|
|
|
|
|
|
|
The returned +{response}+ returns the full representation of
|
|
|
|
the updated {ml} datafeed if it has been successfully updated.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
|
|
|
--------------------------------------------------
|
2019-07-26 13:47:03 -04:00
|
|
|
<1> The updated datafeed.
|