2018-10-05 11:45:46 -04:00
|
|
|
--
|
|
|
|
:api: open-job
|
|
|
|
:request: OpenJobRequest
|
|
|
|
:response: OpenJobResponse
|
|
|
|
--
|
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
|
|
|
=== Open {anomaly-jobs} API
|
2018-08-15 14:19:41 -04:00
|
|
|
|
2019-07-25 11:58:16 -04:00
|
|
|
Opens {anomaly-jobs} in the cluster. It accepts a +{request}+ object and
|
|
|
|
responds with a +{response}+ object.
|
2018-08-15 14:19:41 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-request"]
|
2020-10-02 17:01:01 -04:00
|
|
|
==== Open {anomaly-jobs} request
|
2018-08-15 14:19:41 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
An +{request}+ object gets created with an existing non-null `jobId`.
|
2018-08-15 14:19:41 -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-15 14:19:41 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> Constructing a new request referencing an existing `jobId`
|
|
|
|
<2> Optionally setting the `timeout` value for how long the
|
|
|
|
execution should wait for the job to be opened.
|
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-response"]
|
2020-10-02 17:01:01 -04:00
|
|
|
==== Open {anomaly-jobs} response
|
2018-08-15 14:19:41 -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-15 14:19:41 -04:00
|
|
|
--------------------------------------------------
|
2020-04-22 07:06:53 -04:00
|
|
|
<1> `isOpened()` from the +{response}+ is always `true` if the job was
|
|
|
|
opened successfully. (An exception would be thrown instead if the job
|
|
|
|
was not opened successfully.)
|
|
|
|
<2> `getNode()` returns the node that the job was assigned to. If the
|
|
|
|
job is allowed to open lazily and has not yet been assigned to a node
|
|
|
|
then an empty string is returned. If `getNode()` returns `null` then
|
|
|
|
the server is an old version that does not return node information.
|
2018-08-15 14:19:41 -04:00
|
|
|
|
2020-04-22 07:06:53 -04:00
|
|
|
include::../execution.asciidoc[]
|