get-datafeed.asciidoc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. IMPORTANT: This API returns a maximum of 10,000 {dfeeds}.
  22. [[ml-get-datafeed-path-parms]]
  23. == {api-path-parms-title}
  24. `<feed_id>`::
  25. (Optional, string)
  26. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=datafeed-id-wildcard]
  27. +
  28. You can get information for multiple {dfeeds} in a single API request by using a
  29. comma-separated list of {dfeeds} or a wildcard expression. You can get
  30. information for all {dfeeds} by using `_all`, by specifying `*` as the
  31. {dfeed} identifier, or by omitting the identifier.
  32. [[ml-get-datafeed-query-parms]]
  33. == {api-query-parms-title}
  34. `allow_no_match`::
  35. (Optional, Boolean)
  36. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=allow-no-match-datafeeds]
  37. `exclude_generated`::
  38. (Optional, Boolean)
  39. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=exclude-generated]
  40. [[ml-get-datafeed-results]]
  41. == {api-response-body-title}
  42. The API returns an array of {dfeed} resources. For the full list of properties,
  43. see <<ml-put-datafeed-request-body,create {dfeeds} API>>.
  44. [[ml-get-datafeed-response-codes]]
  45. == {api-response-codes-title}
  46. `404` (Missing resources)::
  47. If `allow_no_match` is `false`, this code indicates that there are no
  48. resources that match the request or only partial matches for the request.
  49. [[ml-get-datafeed-example]]
  50. == {api-examples-title}
  51. [source,console]
  52. --------------------------------------------------
  53. GET _ml/datafeeds/datafeed-high_sum_total_sales
  54. --------------------------------------------------
  55. // TEST[skip:kibana sample data]
  56. The API returns the following results:
  57. [source,console-result]
  58. ----
  59. {
  60. "count" : 1,
  61. "datafeeds" : [
  62. {
  63. "datafeed_id" : "datafeed-high_sum_total_sales",
  64. "job_id" : "high_sum_total_sales",
  65. "query_delay" : "93169ms",
  66. "indices" : [
  67. "kibana_sample_data_ecommerce"
  68. ],
  69. "query" : {
  70. "bool" : {
  71. "filter" : [
  72. {
  73. "term" : {
  74. "_index" : "kibana_sample_data_ecommerce"
  75. }
  76. }
  77. ]
  78. }
  79. },
  80. "scroll_size" : 1000,
  81. "chunking_config" : {
  82. "mode" : "auto"
  83. },
  84. "delayed_data_check_config" : {
  85. "enabled" : true
  86. }
  87. }
  88. ]
  89. }
  90. ----
  91. // TESTRESPONSE[s/"query.boost": "93169ms"/"query.boost": $body.query.boost/]