get-datafeed.asciidoc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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_datafeeds`::
  41. (Optional, boolean)
  42. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=allow-no-datafeeds]
  43. [[ml-get-datafeed-results]]
  44. == {api-response-body-title}
  45. The API returns an array of {dfeed} resources. For the full list of properties,
  46. see <<ml-put-datafeed-request-body,create {dfeeds} API>>.
  47. [[ml-get-datafeed-response-codes]]
  48. == {api-response-codes-title}
  49. `404` (Missing resources)::
  50. If `allow_no_datafeeds` is `false`, this code indicates that there are no
  51. resources that match the request or only partial matches for the request.
  52. [[ml-get-datafeed-example]]
  53. == {api-examples-title}
  54. [source,console]
  55. --------------------------------------------------
  56. GET _ml/datafeeds/datafeed-high_sum_total_sales
  57. --------------------------------------------------
  58. // TEST[skip:kibana sample data]
  59. The API returns the following results:
  60. [source,console-result]
  61. ----
  62. {
  63. "count" : 1,
  64. "datafeeds" : [
  65. {
  66. "datafeed_id" : "datafeed-high_sum_total_sales",
  67. "job_id" : "high_sum_total_sales",
  68. "query_delay" : "93169ms",
  69. "indices" : [
  70. "kibana_sample_data_ecommerce"
  71. ],
  72. "query" : {
  73. "bool" : {
  74. "filter" : [
  75. {
  76. "term" : {
  77. "_index" : "kibana_sample_data_ecommerce"
  78. }
  79. }
  80. ]
  81. }
  82. },
  83. "scroll_size" : 1000,
  84. "chunking_config" : {
  85. "mode" : "auto"
  86. },
  87. "delayed_data_check_config" : {
  88. "enabled" : true
  89. }
  90. }
  91. ]
  92. }
  93. ----
  94. // TESTRESPONSE[s/"query.boost": "93169ms"/"query.boost": $body.query.boost/]