get-datafeed.asciidoc 2.9 KB

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