2017-06-19 21:23:58 -04:00
|
|
|
[role="xpack"]
|
2018-08-31 19:49:24 -04:00
|
|
|
[testenv="platinum"]
|
2017-04-04 18:26:39 -04:00
|
|
|
[[ml-get-datafeed]]
|
2020-07-20 16:10:54 -04:00
|
|
|
= Get {dfeeds} API
|
2019-04-30 13:46:13 -04:00
|
|
|
|
|
|
|
[subs="attributes"]
|
2017-12-14 13:52:49 -05:00
|
|
|
++++
|
2018-12-20 13:23:28 -05:00
|
|
|
<titleabbrev>Get {dfeeds}</titleabbrev>
|
2017-12-14 13:52:49 -05:00
|
|
|
++++
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2018-06-13 16:37:35 -04:00
|
|
|
Retrieves configuration information for {dfeeds}.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2019-06-27 12:42:47 -04:00
|
|
|
[[ml-get-datafeed-request]]
|
2020-07-20 16:10:54 -04:00
|
|
|
== {api-request-title}
|
2017-08-09 11:30:21 -04:00
|
|
|
|
2018-12-07 15:34:11 -05:00
|
|
|
`GET _ml/datafeeds/<feed_id>` +
|
2017-08-09 11:30:21 -04:00
|
|
|
|
2018-12-07 15:34:11 -05:00
|
|
|
`GET _ml/datafeeds/<feed_id>,<feed_id>` +
|
2017-08-09 11:30:21 -04:00
|
|
|
|
2018-12-07 15:34:11 -05:00
|
|
|
`GET _ml/datafeeds/` +
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2019-06-27 16:58:42 -04:00
|
|
|
`GET _ml/datafeeds/_all`
|
|
|
|
|
|
|
|
[[ml-get-datafeed-prereqs]]
|
2020-07-20 16:10:54 -04:00
|
|
|
== {api-prereq-title}
|
2019-06-27 16:58:42 -04:00
|
|
|
|
|
|
|
* If the {es} {security-features} are enabled, you must have `monitor_ml`,
|
|
|
|
`monitor`, `manage_ml`, or `manage` cluster privileges to use this API. See
|
2020-07-23 19:43:10 -04:00
|
|
|
<<security-privileges>> and {ml-docs-setup-privileges}.
|
2017-08-09 11:30:21 -04:00
|
|
|
|
2019-06-27 12:42:47 -04:00
|
|
|
[[ml-get-datafeed-desc]]
|
2020-07-20 16:10:54 -04:00
|
|
|
== {api-description-title}
|
2017-04-18 18:13:21 -04:00
|
|
|
|
2017-08-09 11:30:21 -04:00
|
|
|
You can get information for multiple {dfeeds} in a single API request by using a
|
|
|
|
comma-separated list of {dfeeds} or a wildcard expression. You can get
|
|
|
|
information for all {dfeeds} by using `_all`, by specifying `*` as the
|
|
|
|
`<feed_id>`, or by omitting the `<feed_id>`.
|
2017-04-18 18:13:21 -04:00
|
|
|
|
2019-01-17 13:47:15 -05:00
|
|
|
IMPORTANT: This API returns a maximum of 10,000 {dfeeds}.
|
|
|
|
|
2019-06-27 12:42:47 -04:00
|
|
|
[[ml-get-datafeed-path-parms]]
|
2020-07-20 16:10:54 -04:00
|
|
|
== {api-path-parms-title}
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`<feed_id>`::
|
2019-12-30 12:35:16 -05:00
|
|
|
(Optional, string)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=datafeed-id-wildcard]
|
2019-12-30 12:35:16 -05:00
|
|
|
+
|
|
|
|
--
|
|
|
|
If you do not specify one of these options, the API returns information about
|
|
|
|
all {dfeeds}.
|
|
|
|
--
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2019-07-25 10:45:06 -04:00
|
|
|
[[ml-get-datafeed-query-parms]]
|
2020-07-20 16:10:54 -04:00
|
|
|
== {api-query-parms-title}
|
2019-07-25 10:45:06 -04:00
|
|
|
|
2020-08-05 07:39:40 -04:00
|
|
|
`allow_no_match`::
|
2019-12-30 12:35:16 -05:00
|
|
|
(Optional, boolean)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=allow-no-datafeeds]
|
2019-07-25 10:45:06 -04:00
|
|
|
|
2019-06-27 12:42:47 -04:00
|
|
|
[[ml-get-datafeed-results]]
|
2020-07-20 16:10:54 -04:00
|
|
|
== {api-response-body-title}
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2019-12-30 12:35:16 -05:00
|
|
|
The API returns an array of {dfeed} resources. For the full list of properties,
|
|
|
|
see <<ml-put-datafeed-request-body,create {dfeeds} API>>.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2019-07-25 10:45:06 -04:00
|
|
|
[[ml-get-datafeed-response-codes]]
|
2020-07-20 16:10:54 -04:00
|
|
|
== {api-response-codes-title}
|
2019-07-25 10:45:06 -04:00
|
|
|
|
|
|
|
`404` (Missing resources)::
|
2020-08-05 07:39:40 -04:00
|
|
|
If `allow_no_match` is `false`, this code indicates that there are no
|
2019-07-25 10:45:06 -04:00
|
|
|
resources that match the request or only partial matches for the request.
|
|
|
|
|
2019-06-27 12:42:47 -04:00
|
|
|
[[ml-get-datafeed-example]]
|
2020-07-20 16:10:54 -04:00
|
|
|
== {api-examples-title}
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2017-04-11 21:52:47 -04:00
|
|
|
--------------------------------------------------
|
2019-12-30 12:35:16 -05:00
|
|
|
GET _ml/datafeeds/datafeed-high_sum_total_sales
|
2017-04-11 21:52:47 -04:00
|
|
|
--------------------------------------------------
|
2019-12-30 12:35:16 -05:00
|
|
|
// TEST[skip:Kibana sample data]
|
2017-04-11 21:52:47 -04:00
|
|
|
|
|
|
|
The API returns the following results:
|
2019-09-06 16:09:09 -04:00
|
|
|
|
|
|
|
[source,console-result]
|
2017-04-04 18:26:39 -04:00
|
|
|
----
|
|
|
|
{
|
|
|
|
"count": 1,
|
|
|
|
"datafeeds": [
|
|
|
|
{
|
2019-12-30 12:35:16 -05:00
|
|
|
"datafeed_id": "datafeed-high_sum_total_sales",
|
|
|
|
"job_id": "high_sum_total_sales",
|
|
|
|
"query_delay": "93169ms",
|
2017-08-10 11:22:59 -04:00
|
|
|
"indices": [
|
2019-12-30 12:35:16 -05:00
|
|
|
"kibana_sample_data_ecommerce"
|
2017-04-04 18:26:39 -04:00
|
|
|
],
|
2019-12-30 12:35:16 -05:00
|
|
|
"query" : {
|
|
|
|
"bool" : {
|
|
|
|
"filter" : [
|
|
|
|
{
|
|
|
|
"term" : {
|
|
|
|
"_index" : "kibana_sample_data_ecommerce"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2017-04-04 18:26:39 -04:00
|
|
|
}
|
|
|
|
},
|
2017-04-11 21:52:47 -04:00
|
|
|
"scroll_size": 1000,
|
|
|
|
"chunking_config": {
|
2017-08-10 11:22:59 -04:00
|
|
|
"mode": "auto"
|
2019-12-30 12:35:16 -05:00
|
|
|
},
|
|
|
|
"delayed_data_check_config" : {
|
|
|
|
"enabled" : true
|
2017-04-11 21:52:47 -04:00
|
|
|
}
|
2017-04-04 18:26:39 -04:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
----
|