千问办公企业旗舰版开发者文档:查询子会话。
认证方式见APP开发者文档 → 认证接入。
先检查父会话归属,再按同一用户过滤直接子会话;不递归返回整棵子会话树,不返回已删除或其他用户的子会话。原会话详情中的内联 children 摘要保持不变,需要更多直接子会话时使用本接口。
limit 默认20、最大100;首次省略 cursor,后续使用 next_cursor,并以 has_more 判断是否继续。items 为空时返回空数组。游标沿用当前偏移分页,数据变更期间不保证快照一致性;
401:入口身份无效;404:资源不存在、已删除或非本人;422:输入无效;503:所需依赖未装配或暂不可用。业务状态和审核拒绝按服务端错误体处理。
本接口不接受调用方传入身份来改变归属,不暴露内部 extra_data、沙箱凭据或模型 runtime 配置。写入超时后先查询实际状态,不把超时视为操作未发生。
- 模块:会话服务
- 接口:GET
/api/openapi/app/v1/sessions/{session_id}/children - operationId:
list-child-sessions
接口说明
先检查父会话归属,再按同一用户过滤直接子会话;不递归返回整棵子会话树,不返回已删除或其他用户的子会话。原会话详情中的内联 children 摘要保持不变,需要更多直接子会话时使用本接口。
请求参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| session_id (path) | string | 是 | 创建会话接口返回的会话 ID。 |
| cursor (query) | integer | 否 | minimum=0 |
| limit (query) | integer | 否 | default=20;minimum=1;maximum=100 |
成功响应
HTTP 200
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| has_more | boolean | 是 | 是否存在下一页;以此字段为准,不能仅根据当前页是否满额判断。 |
| items | array | 是 | 会话列表,最新在前;没有会话时返回空数组,不为 null。 |
| items[].created_at | string | 是 | 会话创建时间,ISO 8601,含微秒和时区。 |
| items[].end_reason | string/null | 是 | 会话结束原因;尚未结束时为 null,仅 terminated 状态下设置。 |
| items[].mode | string | 是 | 会话使用的能力档位。 |
| items[].name | string | 是 | 显示名称。 |
| items[].session_id | string | 是 | 会话 ID,可用于查询会话详情。 |
| items[].status | string | 是 | 当前会话状态。使用 status=action_required 筛选等待用户回应的会话。 |
| items[].updated_at | string | 是 | 会话记录最近更新时间,ISO 8601。 |
| next_cursor | integer | 是 | 下一页请求的 cursor,没有下一页时为 0;是否继续翻页以 has_more 为准。 |