Allows you to stop running tasks. Some tasks cannot be completed immediately. In this case, the 202 (Accepted)
code is returned and the task state changes to Stopping.
Method:
POST /api/2.0/virtualization/tasks/{ID
}/cancel
where:
{
ID
}
– task identifier (required parameter).
Return codes:
200 (OK)
– request completed successfully (the task was canceled).202 (Accepted)
– request is accepted for execution (the task state changes to Stopping).403 (Forbidden)
– access to the resource is denied.404 (Not Found)
– task with the specified identifier is not found.405 (Method Not Allowed)
– for child tasks: you can cancel a child task only if you cancel the parent task.409 (Conflict)
– the task is already in one of the following states: Cancelled, Failed, Stopped.