ai
POST /v1/ai/site-agent/sites/{site_id}/check
Read this site's server, diagnose it, and fix what the customer allows.
Xác thực
Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền sites.view; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.
Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.
Dùng thử
Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.
curl -X POST https://api.zinndigital.com/v1/ai/site-agent/sites/{site_id}/check \
-H "Authorization: Bearer zdk_live_…"Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API
Chi tiết
Reads the site's live server — error log, PHP faults, slow queries, disk and memory — diagnoses what is wrong, and applies the fixes this customer has allowed to run unattended. Fixes they have asked to be asked about come back in `offered` with the finding that triggered them, so the screen can show the button. Log text is **redacted before it leaves the server**: visitor IP addresses, email addresses, tokens, keys and passwords are masked, and `logs.sources[].masked` reports how many runs of each kind were removed. On our own fleet the server-wide error log is filtered to this account on the host, so another tenant's lines are never transferred at all. A source that could not be read is returned with `state: unavailable` and a reason, **never omitted** — "we found nothing wrong" and "we could not look" are different answers and only one of them is reassuring. `incomplete` is true whenever any source is in that state. Counts against the monthly allowance. A `402` means the allowance is exhausted or the account is not in good standing; the body carries the allowance and a message. Requires `sites.view`.
Tham số
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
site_id (path) | Uuid | Có | — |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
site_id | Uuid | Có | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
source | string<ticket, self_serve, staff> | Có | — |
incomplete | boolean | Có | True when any source could not be read or the diagnosis was partial. |
refused | boolean | Có | — |
refusal_code | string | Không | `allowance_exhausted` or `not_in_good_standing`. |
refusal_message | string | Không | — |
logs | AiSiteAgentLogs | Có | — |
findings | AiSiteAgentFinding[] | Có | — |
applied | object[] | Có | Fixes the AI applied, and under which mode. |
offered | object[] | Có | Fixes found but NOT applied, with why. `awaiting_your_approval` means the customer asked to be asked; anything else names a refusal. |
allowance | AiSiteAgentAllowance | Không | — |
Các lỗi điểm cuối này có thể trả về
401 · 402 · 403 · 404 · 422 · 429