POST /api/v1/forward/sessions/{session_id}/cancel
現在のターンのキャンセルを要求します。実行中のターンがない場合、このエンドポイントはキャンセルを開始せずに成功を返します。
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT> |
Idempotency-Key | No | 安全でないリクエスト向けの任意の冪等性キー。 |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Session ID。 |
Example request
Example response
HTTP 202 AcceptedResponse fields
| Field | Type | Description |
|---|---|---|
id | string | Session ID。 |
type | string | 常に session。 |
status | string | キャンセルが受理されると canceling。 |
Errors
| HTTP | Type | Code | Trigger |
|---|---|---|---|
| 401 | authentication_error | authentication_required | PAT が無効または期限切れ。 |
| 404 | not_found_error | session_not_found | Session が存在しない。 |
| 409 | conflict_error | session_archived | Session がアーカイブ済み。 |
| 502 | api_error | runtime_unavailable | ランタイムセッションサービスが利用できない。 |
Notes
202 Acceptedはキャンセルが要求されたことを意味します。200 OKはキャンセル対象の実行中ターンがなかったことを意味します。- 完了は Event Stream または Session ステータスのポーリングで確認してください。