get-datafeed.asciidoc 2.1 KB

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