update-datafeed.asciidoc 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --
  2. :api: update-datafeed
  3. :request: UpdateDatafeedRequest
  4. :response: PutDatafeedResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Update Datafeed API
  8. The Update Datafeed API can be used to update a {ml} datafeed
  9. 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 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 datafeed runs in real time.
  32. <6> Optional, a query to filter the search results by. Defaults to the `match_all` query.
  33. <7> Optional, the time interval behind real time that data is queried.
  34. <8> Optional, allows the use of script fields.
  35. <9> Optional, the `size` parameter used in the searches.
  36. <10> Optional, the `jobId` that references the job that the datafeed should be associated with
  37. after the update.
  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