hosting
POST /v1/sites/{siteId}/ide-events
Record something the customer did in the site's web editor.
身份验证
此端点是公开的。它不需要任何凭据或组织——这是我们自己的营销网站和 AI 问答引擎所读取的内容。
此端点不需要组织 ID。您的密钥已用于识别其所属的组织,且响应范围也仅限于该组织。
免费试用
将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/ide-events \
-H "Content-Type: application/json" \
-d '{ "event": <string<file_saved, ai_applied, file_restored, terminal_opened>> }'已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点
详细信息
Appends one row to the site's activity log for an action taken in the editor — a file saved, an AI suggestion applied, an earlier version restored, a terminal opened. Editing the files of a live website is a privileged action and is logged as one. The acting person is taken from the **grant**, which the engine signed when the editor was opened, and never from the request: the caller runs inside the cage being audited, so anything it claimed about identity would be a claim by its own subject. The event name is mapped to a closed set of audit actions for the same reason. **This records what the editor did.** A customer with a terminal can change their own files without it, so it is an accountability trail for actions taken through our tool rather than a filesystem-level record. The filesystem-level answer is the site backup.
参数
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
siteId (path) | Uuid | 是 | Site ID (UUIDv7). |
请求正文
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
event | string<file_saved, ai_applied, file_restored, terminal_opened> | 是 | A closed set. The caller runs inside the cage being audited, so it names an event and the engine chooses the audit action — a log whose rows can be authored by their own subject… |
path | string | 否 | The file, relative to the site. Truncated to 512 characters. |
bytes_before | integer | 否 | Size of the file before the write, so a truncation is visible in the log. |
bytes_after | integer | 否 | — |
version | string | 否 | Which kept version was restored, for a `file_restored` event. |
响应
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
recorded | boolean | 是 | — |
此端点可能返回的错误
404 · 422