| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 | --:api: update-datafeed:request: UpdateDatafeedRequest:response: PutDatafeedResponse--[id="{upid}-{api}"]=== Update Datafeed APIThe Update Datafeed API can be used to update a {ml} datafeedin the cluster. The API accepts a +{request}+ objectas a request and returns a +{response}+.[id="{upid}-{api}-request"]==== Update Datafeed RequestA +{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"]==== Updated Datafeed ArgumentsA `DatafeedUpdate` requires an existing non-null `datafeedId` andallows updating various settings.["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests-file}[{api}-config]--------------------------------------------------<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 job<4> Optional, specifies how data searches are split into time chunks.<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.<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.<10> Optional, the `jobId` that references the job that the datafeed should be associated withafter the update.include::../execution.asciidoc[][id="{upid}-{api}-response"]==== ResponseThe returned +{response}+ returns the full representation ofthe updated {ml} datafeed if it has been successfully updated.["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests-file}[{api}-response]--------------------------------------------------<1> The updated datafeed
 |