get-datafeed.asciidoc 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. [role="xpack"]
  2. [[ml-get-datafeed]]
  3. === Get {dfeeds-cap} API
  4. ++++
  5. <titleabbrev>Get {dfeeds-cap}</titleabbrev>
  6. ++++
  7. Retrieves configuration information for {dfeeds}.
  8. ==== Request
  9. `GET _xpack/ml/datafeeds/<feed_id>` +
  10. `GET _xpack/ml/datafeeds/<feed_id>,<feed_id>` +
  11. `GET _xpack/ml/datafeeds/` +
  12. `GET _xpack/ml/datafeeds/_all` +
  13. ===== Description
  14. You can get information for multiple {dfeeds} in a single API request by using a
  15. comma-separated list of {dfeeds} or a wildcard expression. You can get
  16. information for all {dfeeds} by using `_all`, by specifying `*` as the
  17. `<feed_id>`, or by omitting the `<feed_id>`.
  18. ==== Path Parameters
  19. `feed_id`::
  20. (string) Identifier for the {dfeed}. It can be a {dfeed} identifier or a
  21. wildcard expression. If you do not specify one of these options, the API
  22. returns information about all {dfeeds}.
  23. ==== Results
  24. The API returns the following information:
  25. `datafeeds`::
  26. (array) An array of {dfeed} objects.
  27. For more information, see <<ml-datafeed-resource>>.
  28. ==== Authorization
  29. You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
  30. privileges to use this API. For more information, see
  31. {xpack-ref}/security-privileges.html[Security Privileges].
  32. ==== Examples
  33. The following example gets configuration information for the
  34. `datafeed-total-requests` {dfeed}:
  35. [source,js]
  36. --------------------------------------------------
  37. GET _xpack/ml/datafeeds/datafeed-total-requests
  38. --------------------------------------------------
  39. // CONSOLE
  40. // TEST[setup:server_metrics_datafeed]
  41. The API returns the following results:
  42. [source,js]
  43. ----
  44. {
  45. "count": 1,
  46. "datafeeds": [
  47. {
  48. "datafeed_id": "datafeed-total-requests",
  49. "job_id": "total-requests",
  50. "query_delay": "83474ms",
  51. "indices": [
  52. "server-metrics"
  53. ],
  54. "types": [],
  55. "query": {
  56. "match_all": {
  57. "boost": 1.0
  58. }
  59. },
  60. "scroll_size": 1000,
  61. "chunking_config": {
  62. "mode": "auto"
  63. }
  64. }
  65. ]
  66. }
  67. ----
  68. // TESTRESPONSE[s/"query.boost": "1.0"/"query.boost": $body.query.boost/]