ai
POST /v1/ai/site-agent/sites/{site_id}/check
Read this site's server, diagnose it, and fix what the customer allows.
توثيقِ شناخت
ایک بیرر ٹوکن کے طور پر ایک API کی بھیجیں۔ کی کے پاس sites.view اجازت ہونی چاہیے؛ اس کے بغیر کی کو 404 کے بجائے 403 کے ساتھ مسترد کر دیا جاتا ہے۔
یہ اینڈ پوائنٹ کوئی آرگنائزیشن آئی ڈی نہیں لیتا۔ آپ کی کلید پہلے ہی اس آرگنائزیشن کی شناخت کرتی ہے جس سے یہ تعلق رکھتی ہے، اور اس کا جواب اسی کے مطابق محدود ہوتا ہے۔
آزمائیں
کوئی بھی چیز جو زاویہ دار قوسین میں ہو اسے اپنی اقدار سے بدلیں، اور کلیدی پلیس ہولڈر کو اپنے ڈیش بورڈ کی کسی کلید سے بدلیں۔
curl -X POST https://api.zinndigital.com/v1/ai/site-agent/sites/{site_id}/check \
-H "Authorization: Bearer zdk_live_…"لاگ ان ہیں؟ آپ کے ڈیش بورڈ میں موجود API کنسول آپ کی حقیقی تنظیم کی آئی ڈی اور آپ کی اپنی کلید خود بخود پُر کر دیتا ہے، اور لائیو API پر درخواست چلاتا ہے تاکہ آپ اصل ردعمل دیکھ سکیں۔ اس اینڈ پوائنٹ کو 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