Arkloop Developers

审计日志 (Audit Logs)

所有端点需要 Bearer Token 认证。

查询审计日志

GET /v1/audit-logs

查询参数

参数类型说明
org_idstring按组织过滤(platform_admin 可跨组织查询)
actionstring操作类型,如 user.loginthread.create
actor_user_idstring操作者 ID
target_typestring目标资源类型
sincestring起始时间(RFC3339)
untilstring结束时间(RFC3339)
limitint每页数量
offsetint偏移量
includestring额外字段,include=state 返回 before/after 状态

响应

{
  "data": [
    {
      "id": "...",
      "org_id": "...",
      "actor_user_id": "...",
      "action": "user.login",
      "target_type": "user",
      "target_id": "...",
      "trace_id": "...",
      "metadata": {},
      "ip_address": "1.2.3.4",
      "user_agent": "Mozilla/5.0...",
      "created_at": "2024-01-01T00:00:00Z",
      "before_state": null,
      "after_state": null
    }
  ],
  "total": 1250
}

仅在 include=state 时返回 before_state / after_state

On this page