按 event_id 倒序返回指定 Webhook 最近 7 天的投递事件,每个事件包含当前 Webhook 的 delivery 信息。没有匹配记录时返回空数组;Webhook 删除后,已有投递事件在 7 天保留期内仍可查询。
前提
已完成 Endpoint 与鉴权配置,详见API 总览与认证。
接口
GET /webhook_endpoints/{id}/events
路径参数
id string (必选)
Webhook ID,格式 wep_<ULID>
Query 参数limitinteger (可选)每页数量,默认 20,范围 1~100page string (可选)不透明分页游标;首页不传,后续传上一页返回的 next_page | 请求示例 |
响应字段dataarray<object>事件对象数组data[].type string固定为 eventdata[].id string事件 ID,格式 whe_<ULID>;同一事件的所有投递尝试使用相同外层 iddata[].created_at string事件创建时间,ISO 8601data[].data object事件载荷data[].data.id string资源标识;Thread 事件中为 Session 标识data[].data.type string事件类型data[].data.workspace_id string工作空间 IDdata[].data.session_thread_id stringThread 事件中为具体 Thread 标识data[].delivery object当前 Webhook 的投递信息data[].delivery.webhook_id stringWebhook IDdata[].delivery.status string投递状态,如 SUCCEEDEDdata[].delivery.attempt_count integer投递尝试次数data[].delivery.delivery_at string投递开始时间,ISO 8601data[].delivery.finish_at string投递完成时间,ISO 8601data[].delivery.failure_reason string | null失败原因;成功时为 nullnext_page string | null下一页游标,末页为 nullrequest_id string本次请求的唯一标识,排查问题时附带 | 响应响应包含data(Webhook对象数组)与 next_page(下一页游标,无更多数据时为 null)。 |
错误码
| 状态码 | 错误码 | 说明 |
|---|---|---|
| 400 | 11800016 | invalid webhook event query |