治理和访问事件的记录。
读取审计事件
GET/v2/audit/events
治理和访问事件,最新的在前,保留 365 天。需要 tenant_admin,且 Key 不受 Space 限制。不需要任何能力。
需要的能力 不检查能力。
指南:权限
参数
| 名称 | 位置 | 类型 | 说明 |
|---|---|---|---|
cursor | 查询 | DevCursor | 上一页的 next_cursor。不传则从第一页开始。长度 1 到 1024 |
limit | 查询 | integer | 每页最多返回的条目数:1 到 100,默认 20。1 到 100,默认 20 |
space_id | 查询 | DevSpaceRef | 仅返回该 Space 内的事件。default 指你的默认 Space,和路径里的含义相同。长度 1 到 256 |
key_id | 查询 | DevId | 这个 Key 发起的事件,以及针对它的治理事件:签发、吊销和轮换。长度 1 到 256 |
actor_id | 查询 | DevId | 仅返回该主体发起的事件。长度 1 到 256 |
响应
200application/json
| 字段 | 类型 | 说明 |
|---|---|---|
data必填 | DevAuditEvent[] | 这一页的条目。 |
next_cursor | DevCursor | 作为 cursor 传入以获取下一页。最后一页不返回该字段。 |
错误状态
400 401 403 404 422 429 500 503 错误结构见 错误,各错误码的含义见 错误码。
请求示例
curl "https://api.mirabase.dev/v2/audit/events" \
-H "Authorization: Bearer $MIRABASE_API_KEY"响应结构示例
{
"data": [
{
"id": "<id>",
"action": "<action>",
"outcome": "allowed",
"principal_id": "<principal_id>",
"resource_kind": "<resource_kind>",
"created_at": "2026-11-06T00:00:00Z"
}
]
}