update-datafeed.asciidoc 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --
  2. :api: update-datafeed
  3. :request: UpdateDatafeedRequest
  4. :response: PutDatafeedResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Update datafeed API
  9. Updates a {ml} datafeed in the cluster. The API accepts a +{request}+ object
  10. as a request and returns a +{response}+.
  11. [id="{upid}-{api}-request"]
  12. ==== Update datafeed request
  13. A +{request}+ requires the following argument:
  14. ["source","java",subs="attributes,callouts,macros"]
  15. --------------------------------------------------
  16. include-tagged::{doc-tests-file}[{api}-request]
  17. --------------------------------------------------
  18. <1> The updated configuration of the {ml} datafeed
  19. [id="{upid}-{api}-config"]
  20. ==== Updated datafeed arguments
  21. A `DatafeedUpdate` requires an existing non-null `datafeedId` and
  22. allows updating various settings.
  23. ["source","java",subs="attributes,callouts,macros"]
  24. --------------------------------------------------
  25. include-tagged::{doc-tests-file}[{api}-config]
  26. --------------------------------------------------
  27. <1> Mandatory, non-null `datafeedId` referencing an existing {ml} datafeed.
  28. <2> Optional, set the datafeed aggregations for data gathering.
  29. <3> Optional, the indices that contain the data to retrieve and feed into the
  30. {anomaly-job}.
  31. <4> Optional, specifies how data searches are split into time chunks.
  32. <5> Optional, the interval at which scheduled queries are made while the
  33. datafeed runs in real time.
  34. <6> Optional, a query to filter the search results by. Defaults to the
  35. `match_all` query.
  36. <7> Optional, the time interval behind real time that data is queried.
  37. <8> Optional, allows the use of script fields.
  38. <9> Optional, the `size` parameter used in the searches.
  39. include::../execution.asciidoc[]
  40. [id="{upid}-{api}-response"]
  41. ==== Response
  42. The returned +{response}+ returns the full representation of
  43. the updated {ml} datafeed if it has been successfully updated.
  44. ["source","java",subs="attributes,callouts,macros"]
  45. --------------------------------------------------
  46. include-tagged::{doc-tests-file}[{api}-response]
  47. --------------------------------------------------
  48. <1> The updated datafeed.