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

91 lines
4.5 KiB
Plaintext

[[reference-ml-post_data]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| 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.postData]]
=== client.ml.postData
Send data to an anomaly detection job for analysis. IMPORTANT: For each job, data can be accepted from only a single connection at a time. It is not currently possible to post data to multiple jobs using wildcards or a comma-separated list.
{ref}/ml-post-data.html[{es} documentation]
[discrete]
==== Function signature
[source,ts]
----
(MlPostDataRequest, options?): Promise<MlPostDataResponse>
----
[discrete]
==== Request
[pass]
++++
<pre>
++++
interface MlPostDataRequest<TData = unknown> extends <<RequestBase>> {
job_id: <<Id>>
reset_end?: <<DateTime>>
reset_start?: <<DateTime>>
data?: TData[]
}
[pass]
++++
</pre>
++++
[discrete]
==== Response
[pass]
++++
<pre>
++++
interface MlPostDataResponse {
bucket_count: <<long>>
earliest_record_timestamp: <<long>>
empty_bucket_count: <<long>>
input_bytes: <<long>>
input_field_count: <<long>>
input_record_count: <<long>>
invalid_date_count: <<long>>
job_id: <<Id>>
last_data_time: <<integer>>
latest_record_timestamp: <<long>>
missing_field_count: <<long>>
out_of_order_timestamp_count: <<long>>
processed_field_count: <<long>>
processed_record_count: <<long>>
sparse_bucket_count: <<long>>
}
[pass]
++++
</pre>
++++