-- :api: delete-job :request: DeleteJobRequest :response: AcknowledgedResponse -- [id="{upid}-{api}"] === Delete Job API [id="{upid}-{api}-request"] ==== Delete Job Request A +{request}+ object requires a non-null `jobId` and can optionally set `force`. ["source","java",subs="attributes,callouts,macros"] --------------------------------------------------- include-tagged::{doc-tests-file}[{api}-request] --------------------------------------------------- <1> Constructing a new request referencing an existing `jobId` ==== Optional Arguments The following arguments are optional: ["source","java",subs="attributes,callouts,macros"] --------------------------------------------------- include-tagged::{doc-tests-file}[{api}-request-force] --------------------------------------------------- <1> Use to forcefully delete an opened job; this method is quicker than closing and deleting the job. Defaults to `false`. ["source","java",subs="attributes,callouts,macros"] --------------------------------------------------- include-tagged::{doc-tests-file}[{api}-request-wait-for-completion] --------------------------------------------------- <1> Use to set whether the request should wait until the operation has completed before returning. Defaults to `true`. [id="{upid}-{api}-response"] ==== Delete Job Response The returned +{response}+ object indicates the acknowledgement of the job deletion or the deletion task depending on whether the request was set to wait for completion: ["source","java",subs="attributes,callouts,macros"] --------------------------------------------------- include-tagged::{doc-tests-file}[{api}-response] --------------------------------------------------- <1> whether was job deletion was acknowledged or not; will be `null` when set not to wait for completion <2> the id of the job deletion task; will be `null` when set to wait for completion include::../execution.asciidoc[]