Preview Datafeeds

edit

The preview datafeed API enables you to preview a datafeed.

Request

edit

GET _xpack/ml/datafeeds/<datafeed_id>/_preview

Description

edit

The API returns the first "page" of results from the search that is created by using the current datafeed settings. This preview shows the structure of the data that will be passed to the anomaly detection engine.

Path Parameters

edit
datafeed_id (required)
(string) Identifier for the datafeed

Authorization

edit

You must have monitor_ml, monitor, manage_ml, or manage cluster privileges to use this API. For more information, see Cluster Privileges.

Examples

edit

The following example obtains a preview of the datafeed-farequote datafeed:

GET _xpack/ml/datafeeds/datafeed-farequote/_preview

The data that is returned for this example is as follows:

[
  {
    "@timestamp": 1454803200000,
    "airline": "AAL",
    "responsetime": 132.20460510253906
  },
  {
    "@timestamp": 1454803200000,
    "airline": "JZA",
    "responsetime": 990.4628295898438
  },
  {
    "@timestamp": 1454803200000,
    "airline": "JBU",
    "responsetime": 877.5927124023438
  },
  ...
]