2018-10-05 11:45:46 -04:00
|
|
|
--
|
|
|
|
:api: flush-job
|
|
|
|
:request: FlushJobRequest
|
|
|
|
:response: FlushJobResponse
|
|
|
|
--
|
2019-09-10 11:26:56 -04:00
|
|
|
[role="xpack"]
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}"]
|
2020-10-02 17:01:01 -04:00
|
|
|
=== Flush jobs API
|
2018-09-01 17:01:23 -04:00
|
|
|
|
2020-10-02 17:01:01 -04:00
|
|
|
Flushes an anomaly detection job's datafeed in the cluster.
|
2018-10-05 11:45:46 -04:00
|
|
|
It accepts a +{request}+ object and responds
|
|
|
|
with a +{response}+ object.
|
2018-09-01 17:01:23 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-request"]
|
2020-10-02 17:01:01 -04:00
|
|
|
==== Flush jobs request
|
2018-09-01 17:01:23 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
A +{request}+ object gets created with an existing non-null `jobId`.
|
2018-09-01 17:01:23 -04:00
|
|
|
All other fields are optional for the request.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
2018-09-01 17:01:23 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> Constructing a new request referencing an existing `jobId`
|
|
|
|
|
2020-09-04 19:57:15 -04:00
|
|
|
==== Optional arguments
|
2018-09-01 17:01:23 -04:00
|
|
|
|
|
|
|
The following arguments are optional.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request-options]
|
2018-09-01 17:01:23 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> Set request to calculate the interim results
|
|
|
|
<2> Set the advanced time to flush to the particular time value
|
|
|
|
<3> Set the start time for the range of buckets on which
|
|
|
|
to calculate the interim results (requires `calc_interim` to be `true`)
|
|
|
|
<4> Set the end time for the range of buckets on which
|
|
|
|
to calculate interim results (requires `calc_interim` to be `true`)
|
|
|
|
<5> Set the skip time to skip a particular time value
|
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-response"]
|
2020-10-02 17:01:01 -04:00
|
|
|
==== Flush jobs response
|
2018-09-01 17:01:23 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
A +{response}+ contains an acknowledgement and an optional end date for the
|
2018-09-01 17:01:23 -04:00
|
|
|
last finalized bucket
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
2018-09-01 17:01:23 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> `isFlushed()` indicates if the job was successfully flushed or not.
|
|
|
|
<2> `getLastFinalizedBucketEnd()` provides the timestamp
|
2018-10-05 11:45:46 -04:00
|
|
|
(in milliseconds-since-the-epoch) of the end of the last bucket that was processed.
|
|
|
|
|
|
|
|
include::../execution.asciidoc[]
|