cURL
Filtering by types
types filters by event type and can be repeated (e.g., ?types=message&types=tool_approval_request); omit it to return all events. Common scenarios:
- Restoring approval cards after a disconnect or refresh: use
types=tool_approval_requestto fetch the approval requests of the current batch, then correlate them by(batch_id, call_id) - Fetching runtime errors (e.g.,
pending_tool_approval_unresolved,invalid_tool_approval): usetypes=error; error details live in the top-levelerrorobject of the Message (error.code/error.message), not incontent[].data
Authorizations
string
header
required
DashScope API Key
Path Parameters
string
required
Query Parameters
enum<string>[]
按事件类型过滤,可重复传入。断线/刷新后可用 types=tool_approval_request 补拉审批、types=error 补拉运行期错误(错误详情在 Message 顶层 error 对象,不在 content[].data 中)
enum<string>
default"asc"
排序方向:asc(升序)| desc(降序)
asc,desc
string
按时间窗口过滤(大于),ISO 8601;四个比较运算符可组合
string
按时间窗口过滤(大于等于),ISO 8601
string
按时间窗口过滤(小于),ISO 8601
string
按时间窗口过滤(小于等于),ISO 8601
integer
default20
每页数量,最大 100
string
首次不传,后续传上一次响应的 next_page
Response
200-application/json
(普通事件 · object | error 事件 · object)[]
事件 Message 对象数组,按 order 排序
message / tool_call / tool_call_output / tool_approval_request / tool_approval_response / function_call / function_call_output / mcp_call / mcp_call_output / session_status 事件
- 普通事件
- error 事件
string | null
下一页游标;无更多数据时不返回或为 null
string
本次请求的唯一标识