2018-10-04 14:28:44 -04:00
|
|
|
--
|
|
|
|
:api: preview-datafeed
|
|
|
|
:request: PreviewDatafeedRequest
|
|
|
|
:response: PreviewDatafeedResponse
|
|
|
|
--
|
2019-09-10 11:26:56 -04:00
|
|
|
[role="xpack"]
|
2018-10-04 14:28:44 -04:00
|
|
|
[id="{upid}-{api}"]
|
2020-09-04 19:57:15 -04:00
|
|
|
=== Preview datafeed API
|
2018-10-04 14:28:44 -04:00
|
|
|
|
2020-09-04 19:57:15 -04:00
|
|
|
The preview datafeed API provides the ability to preview a {ml} datafeed's data
|
2018-10-04 14:28:44 -04:00
|
|
|
in the cluster. It accepts a +{request}+ object and responds
|
|
|
|
with a +{response}+ object.
|
|
|
|
|
|
|
|
[id="{upid}-{api}-request"]
|
2020-09-04 19:57:15 -04:00
|
|
|
==== Preview datafeed request
|
2018-10-04 14:28:44 -04:00
|
|
|
|
|
|
|
A +{request}+ object is created referencing a non-null `datafeedId`.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
|
|
|
--------------------------------------------------
|
|
|
|
<1> Constructing a new request referencing an existing `datafeedId`
|
|
|
|
|
|
|
|
[id="{upid}-{api}-response"]
|
2020-09-04 19:57:15 -04:00
|
|
|
==== Preview datafeed response
|
2018-10-04 14:28:44 -04:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
|
|
|
--------------------------------------------------
|
|
|
|
<1> The raw +BytesReference+ of the data preview
|
|
|
|
<2> A +List<Map<String,Object>>+ that represents the previewed data
|
|
|
|
|
|
|
|
include::../execution.asciidoc[]
|