Skip to main content
Sessions

查询 Thread 列表

分页列出 Forward Session 的 coordinator 和 child threads。

请求头

Header是否必填说明
AuthorizationBearer <PAT>

路径参数

参数类型是否必填说明
session_idstringSession ID。

查询参数

参数类型是否必填默认值说明
limitinteger20分页大小,最大 100。
orderstringasc排序方向:ascdesc
before_idstring-返回该 Thread ID 之前的记录。
after_idstring-返回该 Thread ID 之后的记录。
statuses[]string-可重复传入的状态过滤。
include_archivedbooleanfalse是否包含已归档 Thread。

示例请求

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

示例响应

HTTP 200 OK
{
  "data": [
    {
      "id": "sthr_xxx",
      "type": "session_thread",
      "session_id": "sess_xxx",
      "template_id": "tmpl_support",
      "name": "",
      "role": "coordinator",
      "status": "idle",
      "stop_reason": {
        "type": "end_turn"
      },
      "created_at": "2026-06-22T10:00:00Z",
      "updated_at": "2026-06-22T10:05:00Z"
    }
  ],
  "first_id": "sthr_xxx",
  "last_id": "sthr_xxx",
  "has_more": false
}

响应字段

字段

类型

说明

data

array

当前页的 Thread 对象。

first_id

string|null

当前页第一条 Thread ID。

last_id

string|null

当前页最后一条 Thread ID。

has_more

boolean

是否还有更多记录。

错误

HTTPTypeCode触发条件
400invalid_request_errorinvalid_pagination分页参数不合法。
404not_found_errorsession_not_foundSession 不存在。
401authentication_errorauthentication_requiredPAT 无效或已过期。

备注

  • Thread 响应不暴露运行时私有的 agent ID 或原始 agent version。
  • 仅当 Forward 能可靠映射时才返回 template_id

相关