Cancel the current running turn for a Forward session.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
|
|
No |
Optional idempotency key for unsafe requests. |
Path parameters
|
Parameter |
Type |
Required |
Description |
|
|
string |
Yes |
Session ID. |
Example request
curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/sessions/sess_xxx/cancel' \
-H "Authorization: Bearer $QODER_PAT"
Example response
HTTP 202 Accepted
{
"id": "sess_xxx",
"type": "session",
"status": "canceling"
}
Response fields
|
Field |
Type |
Description |
|
|
string |
Session ID. |
|
|
string |
Always |
|
|
string |
|
Errors
|
HTTP |
Type |
Code |
Trigger |
|
401 |
|
|
PAT invalid or expired. |
|
404 |
|
|
Session does not exist. |
|
409 |
|
|
Session is archived. |
|
502 |
|
|
Runtime session service is unavailable. |
Notes
-
202 Acceptedmeans a cancellation was requested. -
200 OKmeans there was no currently running turn to cancel. -
Confirm completion through Event Stream or by polling Session status.