跳转到主要内容

审计日志

通过开放 API 成功执行的每一次创建、更新和删除都会被记录。用审计日志可以向用户展示发生了哪些变更,或为「撤销」重建变更前的状态。 GET /api/v1/audit
参数默认值规则
limit50每页数量,范围 1 到 100
offset0从开头跳过的条目数
subscriptionId可选 UUID;仅返回该订阅的条目
条目按时间倒序返回。该端点只需 read 权限。
curl -H "Authorization: Bearer $SUBSCRIPTION_MANAGER_API_KEY" \
  "https://your-site.example/api/v1/audit?limit=50&subscriptionId=33333333-3333-4333-8333-333333333333"
{
  "data": [
    {
      "id": "...",
      "action": "subscription.update",
      "subscriptionId": "33333333-3333-4333-8333-333333333333",
      "apiKeyId": "...",
      "requestId": "request-...",
      "metadata": {
        "before": { "period": "monthly" },
        "after": { "period": "yearly" },
        "patch": { "period": "yearly" }
      },
      "createdAt": "2026-06-16T00:15:00.000Z"
    }
  ],
  "pagination": { "limit": 50, "offset": 0, "hasMore": false },
  "requestId": "request-..."
}
actionsubscription.createsubscription.updatesubscription.delete 之一。metadata 中在适用时包含 beforeafterpatch 快照——足以描述或回退一次变更。