ai
POST /v1/ai/site-agent/sites/{site_id}/check
Read this site's server, diagnose it, and fix what the customer allows.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (bearer token). يجب أن يحمل المفتاح إذن sites.view؛ والمفتاح الذي لا يملكه يُرفض بالرمز 403 وليس 404.
لا يقبل هذا الطرف أي معرف للمؤسسة. يحدد مفتاحك بالفعل المؤسسة التي ينتمي إليها، وتكون الاستجابة محصورة في نطاقها.
جربه الآن
استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.
curl -X POST https://api.zinndigital.com/v1/ai/site-agent/sites/{site_id}/check \
-H "Authorization: Bearer zdk_live_…"هل سجلت الدخول؟ تقوم وحدة تحكم واجهة برمجة التطبيقات في لوحة التحكم الخاصة بك بربط معرف مؤسستك الحقيقي ومفتاحك الخاص، وتنفذ الطلب مقابل واجهة برمجة التطبيقات المباشرة لتتمكن من رؤية الاستجابة الفعلية. افتح هذه النهاية الطرفية في وحدة تحكم API
التفاصيل
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.
المعلمات
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
site_id (path) | Uuid | نعم | — |
الاستجابة
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
site_id | Uuid | نعم | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
source | string<ticket, self_serve, staff> | نعم | — |
incomplete | boolean | نعم | True when any source could not be read or the diagnosis was partial. |
refused | boolean | نعم | — |
refusal_code | string | لا | allowance_exhausted or not_in_good_standing. |
refusal_message | string | لا | — |
logs | AiSiteAgentLogs | نعم | — |
findings | AiSiteAgentFinding[] | نعم | — |
applied | object[] | نعم | Fixes the AI applied, and under which mode. |
offered | object[] | نعم | Fixes found but NOT applied, with why. awaiting_your_approval means the customer asked to be asked; anything else names a refusal. |
allowance | AiSiteAgentAllowance | لا | — |
الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه
401 · 402 · 403 · 404 · 422 · 429