简体中文API Reference
列出 Thread 事件
按时间顺序返回此 Thread 的最新公开事件日志条目。如果因为达到上限而省略了更早的公开条目,`truncated` 会为 true。事件 ID 是稳定的,因此调用方可以重试或轮询,而不会把同一个 ID 当作新事件处理。
GET
/threads/{threadId}/events按时间顺序返回此 Thread 的最新公开事件日志条目。如果因为达到上限而省略了更早的公开条目,truncated 会为 true。事件 ID 是稳定的,因此调用方可以重试或轮询,而不会把同一个 ID 当作新事件处理。这是面向 CLI 和 API 使用方的稳定快照读取接口;不会暴露原始运行时 payload、转写内容或诊断信息。
Authorization
publicApiBearer AuthorizationBearer <token>
使用 Authorization: Bearer mst_...。API token 用于识别账号,不携带 scope。
In: header
Path Parameters
threadId*string
create thread 返回的 Thread ID。v1 ID 是不带前缀的 ULID。
Match
^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$Format
ulidQuery Parameters
limit?integer
要返回的最新 Thread 事件数量上限。
Range
1 <= value <= 1000Default
100Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/threads/01J00000000000000000000009/events?limit=100"{ "events": [ { "content": "string", "durationMs": 0, "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "occurredAt": "2019-08-24T14:15:22Z", "runId": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "status": "available", "tokens": 0, "type": "agent.message.delta" } ], "truncated": true}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}