update-datafeed.asciidoc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. --
  2. :api: update-datafeed
  3. :request: UpdateDatafeedRequest
  4. :response: PutDatafeedResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Update datafeeds 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 datafeeds 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 datafeeds 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. <10> Optional, the runtime fields used in the datafeed.
  40. include::../execution.asciidoc[]
  41. [id="{upid}-{api}-response"]
  42. ==== Response
  43. The returned +{response}+ returns the full representation of
  44. the updated {ml} datafeed if it has been successfully updated.
  45. ["source","java",subs="attributes,callouts,macros"]
  46. --------------------------------------------------
  47. include-tagged::{doc-tests-file}[{api}-response]
  48. --------------------------------------------------
  49. <1> The updated datafeed.