Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/sessions/{session_id}/cancel
処理中の Session をキャンセルします。Session が現在 processing 状態の場合、Agent の実行を中断し、状態を canceling に遷移させます。Session がすでに idle 状態の場合でも、操作は成功します。
パスパラメータ
| パラメータ | 型 | 説明 |
|---|
session_id | string | Session ID(sess_ プレフィックス) |
ヘッダー
| 名称 | 必須 | 値 |
|---|
| Authorization | はい | Bearer $QODER_PAT |
| Content-Type | はい | application/json |
リクエスト例
curl -X POST https://openapi.qoder.sh/api/v1/cloud/sessions/sess_019e3bb1e8c171fd9abbb1477ffb84cc/cancel \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json"
レスポンス例
HTTP 200 OK
簡略化された状態確認オブジェクトを返します。
{
"id": "sess_019e3bb1e8c171fd9abbb1477ffb84cc",
"type": "session",
"status": "canceling"
}
レスポンスフィールド
| フィールド | 型 | 説明 |
|---|
id | string | Session ID |
type | string | 固定値 "session" |
status | string | キャンセル後の状態、値は "canceling" |
メモ: canceling は中間状態で、キャンセル指令が送信されたことを示します。最終状態は idle または cancelled に変わります。SSE ストリームで session.status_idle イベントを監視することで確認できます。
エラーレスポンス
| HTTP | type | 説明 |
|---|
| 401 | authentication_error | PAT が無効または期限切れ |
| 404 | not_found_error | Session が存在しない |