update-datafeed.asciidoc 2.0 KB

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