{"article":{"title":"Audit trail","breadcrumb":["Operations","Audit trail"],"body":"**What this solves**: How to look up \"who changed what, who viewed what\" on your account — from the console and from the API — and the trap in the console's export button.\n\nThe audit trail answers whether things on my account can be changed or viewed without my knowledge.\n\n### What it records\n\nThe audit trail is a running ledger of the whole account, and content authorization is just one part of it. All of the changes below are recorded here, and each entry states whether you made the change yourself or the platform made it on your behalf:\n\n- Price changes (see [Cost prices](cost-prices))\n- Route changes (see [Routing](routing))\n- Billing-method changes (see [Billing rules](billing))\n- Key limit changes (see [Rate limits and quotas](limits))\n- Credential changes (see [API Key](auth))\n- Every authorization for the platform to read retained call content (see [Call Traces](content-retention))\n\nA key's own governance-setting changes go through the same log: cumulative quota, source IP allowlist and its toggle, DLP settings, the Router it's bound to, expiry, name, and disabling. These are exactly what an attacker would change first after getting hold of a key.\n\n![The audit trail is a running ledger of the whole account](diagram:en-audit-trail-what-is-logged)\n\nIf a change was initiated with an API key (not a login session), the log states which key made it.\n\nToggling a drill (mock) on or off for a key also leaves a trace. Once production traffic quietly starts returning fake data, someone will eventually ask you to explain what happened during that window. See [Drills (Mock)](mock).\n\n### How to look it up in the console\n\nGo to **Audit Trail**.\n\n- Filter by activity type.\n- Filter by time range. It is left empty by default, which means no time limit, not \"the last 24 hours\".\n- Page through the results.\n- Export CSV with the export button on the page.\n\n> [!WARNING]\n> The \"Export\" button on the Audit page only exports the current page (50 rows). **To export the full range, you have to call `GET /v1/audit/events/export` yourself — you can't rely on clicking in the console.**\n\n### How to look it up from the API\n\nThe audit trail is part of the console and admin endpoint group, with the root path `/v1/audit`.\n\n| Endpoint | Purpose |\n|---|---|\n| `GET /v1/audit/events` | Read back this audit ledger |\n| `GET /v1/audit/events/export` | Export the same data (use this for a full export, not the console button) |\n\n`GET /v1/audit/events` can answer more than \"show me everything\" — it can answer narrower questions too:\n\n**Filter by category**: pass `group=`, with these values:\n\n| `group` | Which category it restricts to |\n|---|---|\n| `security` | Security-related |\n| `dlp` | Data-protection-related |\n| `access` | Access-related |\n| `config` | Configuration changes |\n| `staff` | Changes the platform made on your behalf |\n\n**Switch to a security report**: pass `view=summary&days=30` and instead of per-event records you get a security report directly, containing a day-by-day summary over the given time window, which entity types were hit, which keys they came from, and which source addresses were rejected.\n\n### Next steps\n\n- To understand content retention and view authorization themselves: read [Call Traces](content-retention).\n- To understand key settings like the source IP allowlist: read [API Key](auth).\n- To understand DLP hit records: read [Data protection (DLP)](security).\n"},"diagrams":{"en-audit-trail-what-is-logged":"<svg viewBox=\"0 0 708 465\" width=\"708\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\">\n  <title>The audit log is the whole account's ledger</title>\n  <desc>The audit log records price, route, billing method, limits, credentials, and each grant to read retained content. Every row says whether you made the change or ops made it for you. Governance changes on a key use the same record.</desc>\n  <style>\n    text { font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif; }\n  </style>\n  <defs>\n    <marker id=\"arrow-blue\" markerWidth=\"8\" markerHeight=\"8\" refX=\"2\" refY=\"4\" orient=\"auto\" markerUnits=\"userSpaceOnUse\">\n      <path d=\"M0,0 L8,4 L0,8 L2,4 z\" fill=\"#3b82f6\"/>\n    </marker>\n  </defs>\n\n  <!-- 浅色画布 -->\n  <rect x=\"0\" y=\"0\" width=\"708\" height=\"465\" fill=\"#ffffff\"/>\n\n  <!-- 版式算术：\n       顶框横跨整行 22..686（宽 664），高 54（12px + 10px），顶边 60、底边 114。\n       一条竖直连线进分组框：起点 = 顶框底边 + 5 = 119，终点 = 分组框顶边 - 11 = 131。\n       分组框（虚线）142..315，内边距 19：子框从 x=41 排到 667，两行三列，\n       每个宽 190、间距 28（3×190 + 2×28 = 626 = 664 − 2×19），\n       行顶边 180 / 252，高 44（12px 单行），底边 224 / 296。\n       分组框标题压在框内左上角（y = 142 + 14 = 156），它是容器的名字，不是子框的标签。\n       最下面那条是「key 自身治理设置」，与上面六类并列但粒度不同，所以留 28px 单独成条。\n       内容左右边界 22..686，中心 354；viewBox 宽 = 664 + 两侧各 22 = 708。\n       高度 = 脚注末行基线 442 + 下伸 2.5 + 22px 边距 = 466.5，取整 465（边距 20.5，仍在 20–25 内）。 -->\n\n  <text x=\"354\" y=\"34\" font-size=\"16\" fill=\"#1e293b\" text-anchor=\"middle\">The audit log is the whole account's ledger</text>\n\n  <path d=\"M354,119 L 354,131\" fill=\"none\" stroke=\"#3b82f6\" stroke-width=\"1.5\" marker-end=\"url(#arrow-blue)\"/>\n\n  <rect x=\"22\" y=\"60\" width=\"664\" height=\"54\" rx=\"6\" fill=\"#dbeafe\" stroke=\"#3b82f6\"/>\n  <text x=\"354\" y=\"82\" font-size=\"12\" fill=\"#1e40af\" text-anchor=\"middle\">Who changed what, and who looked</text>\n  <text x=\"354\" y=\"100\" font-size=\"10\" fill=\"#1e40af\" text-anchor=\"middle\">Each row says you changed it, or ops did</text>\n\n  <!-- 分组框：六类改动是同一个集合，用容器框住，比六条各自拉一根线更诚实 -->\n  <rect x=\"22\" y=\"142\" width=\"664\" height=\"173\" rx=\"10\" stroke=\"#94a3b8\" stroke-dasharray=\"6,4\" fill=\"#f8fafc\"/>\n  <text x=\"41\" y=\"156\" font-size=\"11\" fill=\"#64748b\">What it records</text>\n\n  <rect x=\"41\" y=\"180\" width=\"190\" height=\"44\" rx=\"6\" fill=\"#dbeafe\" stroke=\"#3b82f6\"/>\n  <text x=\"136\" y=\"206\" font-size=\"12\" fill=\"#1e40af\" text-anchor=\"middle\">Price changes</text>\n  <rect x=\"259\" y=\"180\" width=\"190\" height=\"44\" rx=\"6\" fill=\"#dbeafe\" stroke=\"#3b82f6\"/>\n  <text x=\"354\" y=\"206\" font-size=\"12\" fill=\"#1e40af\" text-anchor=\"middle\">Route changes</text>\n  <rect x=\"477\" y=\"180\" width=\"190\" height=\"44\" rx=\"6\" fill=\"#dbeafe\" stroke=\"#3b82f6\"/>\n  <text x=\"572\" y=\"206\" font-size=\"12\" fill=\"#1e40af\" text-anchor=\"middle\">Billing changes</text>\n\n  <rect x=\"41\" y=\"252\" width=\"190\" height=\"44\" rx=\"6\" fill=\"#dbeafe\" stroke=\"#3b82f6\"/>\n  <text x=\"136\" y=\"278\" font-size=\"12\" fill=\"#1e40af\" text-anchor=\"middle\">Limit changes</text>\n  <rect x=\"259\" y=\"252\" width=\"190\" height=\"44\" rx=\"6\" fill=\"#dbeafe\" stroke=\"#3b82f6\"/>\n  <text x=\"354\" y=\"278\" font-size=\"12\" fill=\"#1e40af\" text-anchor=\"middle\">Credential changes</text>\n  <rect x=\"477\" y=\"252\" width=\"190\" height=\"44\" rx=\"6\" fill=\"#dbeafe\" stroke=\"#3b82f6\"/>\n  <text x=\"572\" y=\"278\" font-size=\"12\" fill=\"#1e40af\" text-anchor=\"middle\">Content-grant reads</text>\n\n  <rect x=\"22\" y=\"343\" width=\"664\" height=\"54\" rx=\"6\" fill=\"#dbeafe\" stroke=\"#3b82f6\"/>\n  <text x=\"354\" y=\"365\" font-size=\"12\" fill=\"#1e40af\" text-anchor=\"middle\">Also: governance changes on a key itself use this same record</text>\n  <text x=\"354\" y=\"383\" font-size=\"10\" fill=\"#1e40af\" text-anchor=\"middle\">Limit, source-IP list and its switch, DLP, bound Router, expiry, name, disable</text>\n\n  <!-- 脚注 -->\n  <text x=\"354\" y=\"427\" font-size=\"10\" fill=\"#64748b\" text-anchor=\"middle\">Content grants are one part. Price, route, billing, limits, and credentials are recorded here too.</text>\n  <text x=\"354\" y=\"442\" font-size=\"10\" fill=\"#64748b\" text-anchor=\"middle\">If an API key made the change, rather than a console session, the row names that key.</text>\n</svg>\n"}}