2018-10-05 11:45:46 -04:00
|
|
|
--
|
|
|
|
:api: close-job
|
|
|
|
:request: CloseJobRequest
|
|
|
|
:response: CloseJobResponse
|
|
|
|
--
|
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
|
|
|
=== Close {anomaly-jobs} API
|
2018-08-20 17:05:56 -04:00
|
|
|
|
2019-07-25 11:58:16 -04:00
|
|
|
Closes {anomaly-jobs} in the cluster. It accepts a +{request}+ object and responds with a +{response}+ object.
|
2018-08-20 17:05:56 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-request"]
|
2020-10-02 17:01:01 -04:00
|
|
|
==== Close {anomaly-jobs} request
|
2018-08-20 17:05:56 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
A +{request}+ object gets created with an existing non-null `jobId`.
|
2018-08-20 17:05:56 -04:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
2018-08-20 17:05:56 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> Constructing a new request referencing existing job IDs
|
|
|
|
<2> Optionally used to close a failed job, or to forcefully close a job
|
|
|
|
which has not responded to its initial close request.
|
|
|
|
<3> Optionally set to ignore if a wildcard expression matches no jobs.
|
|
|
|
(This includes `_all` string or when no jobs have been specified)
|
|
|
|
<4> Optionally setting the `timeout` value for how long the
|
|
|
|
execution should wait for the job to be closed.
|
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-response"]
|
2020-10-02 17:01:01 -04:00
|
|
|
==== Close {anomaly-jobs} response
|
2018-08-20 17:05:56 -04:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
2018-08-20 17:05:56 -04:00
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
<1> `isClosed()` from the +{response}+ indicates if the job was successfully
|
2018-08-20 17:05:56 -04:00
|
|
|
closed or not.
|
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
include::../execution.asciidoc[]
|