流式读取指定 Session thread 的事件。
GET /api/v1/cloud/sessions/{session_id}/threads/{thread_id}/stream
以 Server-Sent Events 流式返回一个 thread 的公开事件。
路径参数
| 参数 | 类型 | 说明 |
|---|---|---|
session_id | string | 以 sess_ 为前缀的 Session ID |
thread_id | string | 以 sthr_ 为前缀的 Thread ID |
请求头
| 头部 | 必选 | 说明 |
|---|---|---|
Authorization | 是 | Bearer $QODER_PAT |
Accept | 否 | 使用 text/event-stream |
Last-Event-ID | 否 | 提供后从该事件 ID 之后续传。事件 ID 不存在、已被归档、指向非公开内部事件,或不属于该 thread 时返回 400 |
示例请求
流格式
服务端会定期发送
: heartbeat 注释行以保持连接活跃。
错误码
| HTTP | 类型 | 触发条件 |
|---|---|---|
| 400 | invalid_request_error | Last-Event-ID 未能识别该 Session/thread 中的有效公开事件 |
| 401 | authentication_error | PAT 无效或过期 |
| 404 | not_found_error | Session 或 thread 不存在 |