get-datafeed.asciidoc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-get-datafeed]]
  4. = Get {dfeeds} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Get {dfeeds}</titleabbrev>
  8. ++++
  9. Retrieves configuration information for {dfeeds}.
  10. [[ml-get-datafeed-request]]
  11. == {api-request-title}
  12. `GET _ml/datafeeds/<feed_id>` +
  13. `GET _ml/datafeeds/<feed_id>,<feed_id>` +
  14. `GET _ml/datafeeds/` +
  15. `GET _ml/datafeeds/_all`
  16. [[ml-get-datafeed-prereqs]]
  17. == {api-prereq-title}
  18. * If the {es} {security-features} are enabled, you must have `monitor_ml`,
  19. `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. See
  20. <<security-privileges>> and {ml-docs-setup-privileges}.
  21. [[ml-get-datafeed-desc]]
  22. == {api-description-title}
  23. You can get information for multiple {dfeeds} in a single API request by using a
  24. comma-separated list of {dfeeds} or a wildcard expression. You can get
  25. information for all {dfeeds} by using `_all`, by specifying `*` as the
  26. `<feed_id>`, or by omitting the `<feed_id>`.
  27. IMPORTANT: This API returns a maximum of 10,000 {dfeeds}.
  28. [[ml-get-datafeed-path-parms]]
  29. == {api-path-parms-title}
  30. `<feed_id>`::
  31. (Optional, string)
  32. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=datafeed-id-wildcard]
  33. +
  34. --
  35. If you do not specify one of these options, the API returns information about
  36. all {dfeeds}.
  37. --
  38. [[ml-get-datafeed-query-parms]]
  39. == {api-query-parms-title}
  40. `allow_no_match`::
  41. (Optional, boolean)
  42. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=allow-no-datafeeds]
  43. `for_export`::
  44. (Optional, boolean)
  45. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=for-export]
  46. [[ml-get-datafeed-results]]
  47. == {api-response-body-title}
  48. The API returns an array of {dfeed} resources. For the full list of properties,
  49. see <<ml-put-datafeed-request-body,create {dfeeds} API>>.
  50. [[ml-get-datafeed-response-codes]]
  51. == {api-response-codes-title}
  52. `404` (Missing resources)::
  53. If `allow_no_match` is `false`, this code indicates that there are no
  54. resources that match the request or only partial matches for the request.
  55. [[ml-get-datafeed-example]]
  56. == {api-examples-title}
  57. [source,console]
  58. --------------------------------------------------
  59. GET _ml/datafeeds/datafeed-high_sum_total_sales
  60. --------------------------------------------------
  61. // TEST[skip:kibana sample data]
  62. The API returns the following results:
  63. [source,console-result]
  64. ----
  65. {
  66. "count" : 1,
  67. "datafeeds" : [
  68. {
  69. "datafeed_id" : "datafeed-high_sum_total_sales",
  70. "job_id" : "high_sum_total_sales",
  71. "query_delay" : "93169ms",
  72. "indices" : [
  73. "kibana_sample_data_ecommerce"
  74. ],
  75. "query" : {
  76. "bool" : {
  77. "filter" : [
  78. {
  79. "term" : {
  80. "_index" : "kibana_sample_data_ecommerce"
  81. }
  82. }
  83. ]
  84. }
  85. },
  86. "scroll_size" : 1000,
  87. "chunking_config" : {
  88. "mode" : "auto"
  89. },
  90. "delayed_data_check_config" : {
  91. "enabled" : true
  92. }
  93. }
  94. ]
  95. }
  96. ----
  97. // TESTRESPONSE[s/"query.boost": "93169ms"/"query.boost": $body.query.boost/]