PUT /tasks

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

Note:
  • This API requires Lenovo XClarity Administrator v1.2.0 or later.

  • Deleting one or more task using this API is no longer supported. Use DELETE /tasks/{job_list} instead.

Authentication

Authentication with user name and password is required.

Request URL

PUT https://{management_server_IP}/tasks

Query parameters

None

Request body

Table 1. Cancel one or more jobs
Attributes Required / Optional Type Description
action Required String Action to take. This can be the following value.
  • cancel. Cancels the specified jobs.

list Required Array of strings One or more job IDs
The following example cancels a single job.
{
   "action": "cancel",
   "list": ["83"]
}

Response codes

Code Description Comments
200 OK The request completed successfully.
400 Bad Request A 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.
401 Unauthorized The user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body.
403 Forbidden The 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. If the management server is not license compliant, the compliance response code is set to 0.

412 Precondition failed Specified data is invalid because of missing values. A descriptive error message is returned in the response body.
500 Internal Server Error An internal error occurred. A descriptive error message is returned in the response body.

Response body

None