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]]
|
2018-12-20 13:23:28 -05: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
|
|
|
|
2017-06-06 16:42:47 -04:00
|
|
|
==== Request
|
2017-04-04 18:26:39 -04:00
|
|
|
|
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
|
|
|
|
2018-12-07 15:34:11 -05:00
|
|
|
`GET _ml/datafeeds/_all` +
|
2017-08-09 11:30:21 -04:00
|
|
|
|
|
|
|
|
|
|
|
===== Description
|
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}.
|
|
|
|
|
2017-06-06 16:42:47 -04:00
|
|
|
==== Path Parameters
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
`feed_id`::
|
2017-08-09 11:30:21 -04:00
|
|
|
(string) Identifier for the {dfeed}. It can be a {dfeed} identifier or a
|
|
|
|
wildcard expression. If you do not specify one of these options, the API
|
|
|
|
returns information about all {dfeeds}.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-25 17:08:29 -04:00
|
|
|
|
2017-06-06 16:42:47 -04:00
|
|
|
==== Results
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-11 21:52:47 -04:00
|
|
|
The API returns the following information:
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-11 21:52:47 -04:00
|
|
|
`datafeeds`::
|
2017-05-02 15:45:42 -04:00
|
|
|
(array) An array of {dfeed} objects.
|
|
|
|
For more information, see <<ml-datafeed-resource>>.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
|
2017-06-06 16:42:47 -04:00
|
|
|
==== Authorization
|
2017-04-25 17:08:29 -04:00
|
|
|
|
|
|
|
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
|
2017-06-19 21:23:58 -04:00
|
|
|
privileges to use this API. For more information, see
|
|
|
|
{xpack-ref}/security-privileges.html[Security Privileges].
|
2017-04-25 17:08:29 -04:00
|
|
|
|
|
|
|
|
2017-06-06 16:42:47 -04:00
|
|
|
==== Examples
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-11 21:52:47 -04:00
|
|
|
The following example gets configuration information for the
|
2018-02-20 14:08:37 -05:00
|
|
|
`datafeed-total-requests` {dfeed}:
|
2017-04-11 21:52:47 -04:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2018-12-07 15:34:11 -05:00
|
|
|
GET _ml/datafeeds/datafeed-total-requests
|
2017-04-11 21:52:47 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
2018-08-31 19:49:24 -04:00
|
|
|
// TEST[skip:setup:server_metrics_datafeed]
|
2017-04-11 21:52:47 -04:00
|
|
|
|
|
|
|
The API returns the following results:
|
2017-04-21 11:23:27 -04:00
|
|
|
[source,js]
|
2017-04-04 18:26:39 -04:00
|
|
|
----
|
|
|
|
{
|
|
|
|
"count": 1,
|
|
|
|
"datafeeds": [
|
|
|
|
{
|
2018-02-20 14:08:37 -05:00
|
|
|
"datafeed_id": "datafeed-total-requests",
|
|
|
|
"job_id": "total-requests",
|
|
|
|
"query_delay": "83474ms",
|
2017-08-10 11:22:59 -04:00
|
|
|
"indices": [
|
2018-02-20 14:08:37 -05:00
|
|
|
"server-metrics"
|
2017-04-04 18:26:39 -04:00
|
|
|
],
|
|
|
|
"query": {
|
|
|
|
"match_all": {
|
2018-02-20 14:08:37 -05:00
|
|
|
"boost": 1.0
|
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"
|
2017-04-11 21:52:47 -04:00
|
|
|
}
|
2017-04-04 18:26:39 -04:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
----
|
2018-02-20 14:08:37 -05:00
|
|
|
// TESTRESPONSE[s/"query.boost": "1.0"/"query.boost": $body.query.boost/]
|