OpenSearch/docs/java-rest/high-level/ml/preview-datafeed.asciidoc
Benjamin Trent 2dd058d607
HLRC: ML Add preview datafeed api (#34284)
* HLRC: ML Add preview datafeed api

* Changing deprecation handling for parser

* Removing some duplication in docs, will address other APIs in another PR
2018-10-04 11:28:44 -07:00

35 lines
1.1 KiB
Plaintext

--
:api: preview-datafeed
:request: PreviewDatafeedRequest
:response: PreviewDatafeedResponse
--
[id="{upid}-{api}"]
=== Preview Datafeed API
The Preview Datafeed API provides the ability to preview a {ml} datafeed's data
in the cluster. It accepts a +{request}+ object and responds
with a +{response}+ object.
[id="{upid}-{api}-request"]
==== Preview Datafeed Request
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"]
==== Preview Datafeed Response
["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[]