Cancel Task
Request
Section titled “Request”Cancellation can use the cancel_url from the create-task response, or build the request path with BASE_URL, endpoint, and request_id. Cancellation requests use the PUT method.
curl -sS -X PUT "${CANCEL_URL}" \ "${COMMON_HEADERS[@]}"curl -sS -X PUT "${BASE_URL}/v1/queue/${ENDPOINT}/requests/${REQUEST_ID}/cancel" \ "${COMMON_HEADERS[@]}"Response
Section titled “Response”| HTTP status code | status | Meaning |
|---|---|---|
| 202 | CANCELLATION_REQUESTED | Cancellation request accepted |
| 400 | ALREADY_COMPLETED | The task is already terminal and cannot be canceled |
| 404 | NOT_FOUND | The task does not exist or access is not permitted |