接口详情
GET /v1/audit-logs
List rendered operation log rows, newest first
- operationId
listAuditLogs- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:platform.admin identity.self.read
参数
listAuditLogs 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
category | query | string | const all | 否 | — |
|---|
exclude_category | query | string | 否 | Drop one category (the admin log center's operation tab excludes auth) |
|---|
scope_id | query | string(uuid) | 否 | Platform administrators only; tenants may only pass their own scope |
|---|
since | query | string(date-time) | 否 | — |
|---|
until | query | string(date-time) | 否 | — |
|---|
actor | query | string | 否 | Username (exact |
|---|
actor_user_id | query | string(uuid) | 否 | — |
|---|
source_ip | query | string | 否 | — |
|---|
resource_type | query | string | 否 | — |
|---|
resource_id | query | string | 否 | — |
|---|
result | query | string: success / denied / failure | 否 | — |
|---|
action | query | string | 否 | — |
|---|
cursor | query | string | 否 | — |
|---|
limit | query | integer | 否 | — |
|---|
tz | query | string | 否 | IANA time zone for the rendered time (default Asia/Shanghai) |
|---|
lang | query | string | 否 | Overrides Accept-Language |
|---|
响应
listAuditLogs 响应| 状态码 | 说明 |
|---|
200 | One page of rows 字段:items: array<Row> next_cursor?: string |
|---|
400 | Invalid filter (audit_log_invalid_request) |
|---|
401 | Unauthenticated |
|---|
403 | Permission denied |
|---|
503 | Log storage unavailable (audit_log_unavailable) |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
GET /v1/audit-logs/categories
Event categories with labels and default retention days
- operationId
listAuditLogCategories- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:platform.admin identity.self.read
参数
listAuditLogCategories 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
lang | query | string | 否 | Overrides Accept-Language |
|---|
响应
listAuditLogCategories 响应| 状态码 | 说明 |
|---|
200 | Categories in display order 字段:items: array<CategoryInfo> |
|---|
401 | Unauthenticated |
|---|
403 | Permission denied |
|---|
失败时怎么办
401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
↑ 回到列表
GET /v1/audit-logs/export
Export the filtered rows as UTF-8 CSV (at most 10000 rows; the export itself is audited as system.audit_log.export)
- operationId
exportAuditLogs- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:platform.admin identity.self.read
响应
exportAuditLogs 响应| 状态码 | 说明 |
|---|
200 | CSV file |
|---|
400 | Invalid filter (audit_log_invalid_request) |
|---|
401 | Unauthenticated |
|---|
403 | Permission denied |
|---|
503 | Log storage or audit unavailable (audit_log_unavailable) |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表