Skip to main content
Sessions

获取 Session Thread

获取指定 Forward Session 中的一个 Thread。

GET /api/v1/forward/sessions/{session_id}/threads/{thread_id}

请求参数

位置参数类型是否必填说明
HeaderAuthorizationstringBearer <PAT 或 SAT>
Pathsession_idstringsess_ 前缀的 Session ID。
Paththread_idstringsthr_ 前缀且属于该 Session 的 Thread ID。

示例请求

curl -s -X GET 'https://api.qoder.com/api/v1/forward/sessions/sess_xxx/threads/sthr_child_xxx' \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

示例响应

{
  "id": "sthr_child_xxx",
  "type": "session_thread",
  "session_id": "sess_xxx",
  "parent_thread_id": "sthr_coordinator_xxx",
  "template_id": "tmpl_worker",
  "name": "research",
  "role": "child",
  "status": "idle",
  "stop_reason": { "type": "end_turn" },
  "created_by_tool_use_id": "toolu_xxx",
  "created_at": "2026-06-22T11:00:00Z",
  "updated_at": "2026-06-22T11:05:00Z"
}
返回值为 Thread 对象

错误

HTTPTypeCode触发条件
401authentication_errorauthentication_requiredPAT 或 SAT 无效或已过期。
404not_foundsession_not_foundSession 不存在或当前调用方不可见。
404not_found_errorthread_not_foundThread 不存在或不属于该 Session。
502api_errorruntime_unavailableThread 运行服务暂时不可用。

备注

  • 该接口可以读取已归档 Thread,是判断 Thread 最终状态的权威来源。
  • Thread lifecycle Event 用于通知和恢复,不应作为归档结果的唯一判断依据。
获取 Session Thread - Qoder