Files
elasticsearch-js/docs/reference-ml-preview_datafeed.asciidoc
2024-12-05 14:46:51 -06:00

75 lines
4.6 KiB
Plaintext

[[reference-ml-preview_datafeed]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
[discrete]
=== client.ml.previewDatafeed
Preview a datafeed. This API returns the first "page" of search results from a datafeed. You can preview an existing datafeed or provide configuration details for a datafeed and anomaly detection job in the API. The preview shows the structure of the data that will be passed to the anomaly detection engine. IMPORTANT: When Elasticsearch security features are enabled, the preview uses the credentials of the user that called the API. However, when the datafeed starts it uses the roles of the last user that created or updated the datafeed. To get a preview that accurately reflects the behavior of the datafeed, use the appropriate credentials. You can also use secondary authorization headers to supply the credentials.
{ref}/ml-preview-datafeed.html[{es} documentation]
[discrete]
==== Function signature
[source,ts]
----
(MlPreviewDatafeedRequest, options?): Promise<MlPreviewDatafeedResponse>
----
[discrete]
==== MlPreviewDatafeedRequest
[pass]
++++
<pre>
++++
interface MlPreviewDatafeedRequest extends <<RequestBase>> {
datafeed_id?: <<Id>>
start?: <<DateTime>>
end?: <<DateTime>>
datafeed_config?: MlDatafeedConfig
job_config?: MlJobConfig
}
[pass]
++++
</pre>
++++
[discrete]
==== MlPreviewDatafeedResponse
[pass]
++++
<pre>
++++
type MlPreviewDatafeedResponse<TDocument = unknown> = TDocument[]
[pass]
++++
</pre>
++++