hosting
GET /v1/sites/{siteId}/web-logs
Get the tail of a site's access and error logs.
تصدیقهویت
یو API کی د بیئرر ټوکن (bearer token) په توګه ولیکئ. کی باید د sites.view اجازه ولري؛ له دې اجازې پرته کی د 404 پرځای د 403 په واسطه رد کیږي.
دا پای نقطه د سازمان هېڅ آی ډي نه اخلي. ستاسو کیلي مخکې تر مخکې هغه سازمان په ګوته کوي چې پورې اړه لري، او ځواب ورته محدود دی.
هڅه وکړئ
د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/web-logs \
-H "Authorization: Bearer zdk_live_…"ننوتي یاست؟ ستاسو په ډشبورډ کې د API کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د API په کنسول کې پرانیزئ
تفصیلات
The customer's own web-server logs for their own site. Until this endpoint existed a customer could not see their access log **at all**, which is why *"why is my site slow"* was a support ticket rather than a tab. ⛔ **The path is `/web-logs`, deliberately not `/logs`.** `/v1/ops/logs` is Loki and staff-only, and two endpoints differing by a prefix are two endpoints somebody confuses in a runbook at three in the morning. ⛔ `access` is a list of the customer's **visitors'** IP addresses — personal data held under the customer's lawful basis, not ours. It is served only to a principal entitled to the site, must not be cached by the client, and both streams are cut to their most recent bytes so a busy site cannot answer with tens of megabytes; `truncated` says so rather than implying the tail is the whole. `unreadable` is `true` when the vendor answered with a body naming neither log — which is **not** the same as a site with no traffic, and must never render as two empty panes. Requires `sites.view` **and** `sites.panel_access`. `404` for a site with no managed hosting package.
پارامترونه
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
siteId (path) | Uuid | هو | Site ID (UUIDv7). |
ځواب
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
access | string | هو | The tail of the access log, or `""` when the vendor published none. |
error | string | هو | The tail of the error log, or `""` when the vendor published none. On a misconfigured application it can carry absolute paths and credentials in a stack trace. |
truncated | boolean | هو | Either stream was cut to its most recent bytes. Say so rather than implying the tail is the whole log. |
unreadable | boolean | هو | The vendor answered with a body naming **neither** log. ⛔ Not the same as a site with no traffic, and must never render as two empty panes. |
تېروتنې چې دا پای ټکی یې بیرته راګرځولی شي
401 · 403 · 404 · 429 · 503