2017-04-04 18:26:39 -04:00
|
|
|
[[ml-preview-datafeed]]
|
|
|
|
==== Preview Data Feeds
|
|
|
|
|
|
|
|
The preview data feed API allows you to preview a data feed.
|
|
|
|
|
|
|
|
===== Request
|
|
|
|
|
|
|
|
`GET _xpack/ml/datafeeds/<feed_id>/_preview`
|
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
|
2017-04-04 18:26:39 -04:00
|
|
|
===== Description
|
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
TBD
|
|
|
|
//How much data does it return?
|
|
|
|
The API returns example data by using the current data feed settings.
|
|
|
|
|
2017-04-04 18:26:39 -04:00
|
|
|
===== Path Parameters
|
|
|
|
|
|
|
|
`feed_id` (required)::
|
|
|
|
(+string+) Identifier for the data feed
|
|
|
|
|
|
|
|
////
|
|
|
|
===== Request Body
|
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
None
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
===== Responses
|
|
|
|
|
|
|
|
TBD
|
|
|
|
////
|
|
|
|
////
|
|
|
|
200
|
|
|
|
(EmptyResponse) The cluster has been successfully deleted
|
|
|
|
404
|
|
|
|
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: clusters.cluster_not_found)
|
|
|
|
412
|
|
|
|
(BasicFailedReply) The Elasticsearch cluster has not been shutdown yet (code: clusters.cluster_plan_state_error)
|
2017-04-10 11:59:27 -04:00
|
|
|
////
|
2017-04-04 18:26:39 -04:00
|
|
|
===== Examples
|
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
The following example obtains a previews of the `datafeed-farequote` data feed:
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2017-04-10 11:59:27 -04:00
|
|
|
GET _xpack/ml/datafeeds/datafeed-farequote/_preview
|
2017-04-04 18:26:39 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
The data that is returned for this example is as follows:
|
2017-04-04 18:26:39 -04:00
|
|
|
----
|
2017-04-10 11:59:27 -04:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"@timestamp": 1454803200000,
|
|
|
|
"responsetime": 132.20460510253906
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"@timestamp": 1454803200000,
|
|
|
|
"responsetime": 990.4628295898438
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"@timestamp": 1454803200000,
|
|
|
|
"responsetime": 877.5927124023438
|
|
|
|
},
|
2017-04-04 18:26:39 -04:00
|
|
|
...
|
2017-04-10 11:59:27 -04:00
|
|
|
]
|
2017-04-04 18:26:39 -04:00
|
|
|
----
|