Skip to main content

PUT /tasks/{job_list}

Use this method to cancel one or more jobs (tasks).

Authentication

Authentication with username and password is required.

Request URL

PUT https://{management_server_IP}/tasks/{job_list}

where {job_list} is a list of one or more job IDs, separated by a comma (for example, 10,11,12). To obtain the job IDs, use the GET /tasks method.

Query parameters

None

Request body

Table 1. Add a cancel callback to a created job
AttributesRequired / OptionalTypeDescription
cancelRESTBodyRequired when cancelRESTMethod is PUT or POSTObjectRequest body for the cancel action, specified as a JSON key-value pair (for example, "a":"b"). JSON formatted request body that is required to cancel the job, specified as a key-value pairs
cancelRESTMethodRequiredStringREST method to cancel the job. This can be one of the following values.
  • GET

  • POST

  • PUT

  • DELETE

cancelURLRequiredStringURL to cancel the job
expirationTimeOutRequiredIntegerNumber of seconds after which the job expires. Use -1 for jobs that do not expire.
The following example cancels the specified jobs.
{
"cancelRESTBody": {
"DeviceList": [{
"ServerList": [{
"UUID": "8BFBADCC33CB11E499F740F2E9903640",
"Components": [{
"Fixid": "lnvgy_fw_imm2_tcoo17g-3.00_anyos_noarch",
"Component": "IMM2 (Backup)"
},
{
"Fixid": "lnvgy_fw_imm2_tcoo17g-3.00_anyos_noarch",
"Component": "IMM2 (Primary)"
}]
}]
}]
},
"cancelRESTMethod":"PUT",
"cancelURL":"/updatableComponents?action=cancelApply&jobID=1",
"expirationTimeOut": 60
}

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
400Bad RequestA query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body.
401UnauthorizedThe user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body.
403ForbiddenThe orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request.

For XClarity Administrator advanced functions, ensure that you have active licenses for each managed server that supports the advanced functions.

404Not foundA specified resource cannot be found. A descriptive error message is returned in the response body.
412Precondition failedSpecified data is invalid because of missing values. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

None

The following example is returned when you create a subtask without using the custom ID.
["152", "153"]
The following example is returned when you create a subtask using the custom ID.
[{
"customUid": "D",
"uid": "70"
},
...,
{
"customUid": "C",
"uid": "69"
}]