hosting
GET /v1/sites/{siteId}/web-logs
Get the tail of a site's access and error logs.
Πισtoποίηση
Στείλτε ένα κλειδί API ως διακριτικό φορέα (bearer token). Το κλειδί πρέπει να διαθέτει το δικαίωμα sites.view· ένα κλειδί που δεν το διαθέτει απορρίπτεται με 403, όχι 404.
Αυτό το τελικό σημείο δεν δέχεται αναγνωριστικό οργανισμού. Το κλειδί σας προσδιορίζει ήδη τον οργανισμό στον οποίο ανήκει, και η απάντηση περιορίζεται σε αυτόν.
Δοκιμάστε το
Ατικatastήstε ό,τι βρίskεtai μέσα σe γώniaδeς μe τis δikές sas timές, kai to placeholder klεidioύ μe éna klεidi apó ton pinaka ελέgchou sas.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/web-logs \
-H "Authorization: Bearer zdk_live_…"Συνδεθήκατε; Η κονσόλα API στον πίνακα ελέγχου σας συμπληρώνει το πραγματικό αναγνωριστικό του οργανισμού σας και το δικό σας κλειδί, και εκτελεί το αίτημα στο ζωντανό API, ώστε να μπορείτε να δείτε την πραγματική απόκριση. Ανοίξτε αυτό το τελικό σημείο στην κονσόλα 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. ⭐ Serves sites on our own servers as well as vendor-hosted ones (W43-54). A fleet site's access log is its own account's file; its error log is filtered for that account on the host, so no other tenant's lines are ever transferred. Each stream carries its own *_available, because on the fleet one log can be readable while the other is not. Requires sites.view and sites.panel_access. 404 for a site that does not exist or is not in scope.
Παράμετροι
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
siteId (path) | Uuid | Ναι | Site ID (UUIDv7). |
Απάντηση
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
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 | Ναι | Neither log could be read. ⛔ Not the same as a site with no traffic, and must never render as two empty panes. |
access_available | boolean | Ναι | Whether the access log could be read. On our own servers the two logs are different files and one can be readable while the other is not, so access: "" with this false means… |
error_available | boolean | Ναι | Whether the error log could be read — the same distinction, for error. |
Σφάλματα που μπορεί να επιστρέψει αυτό το τελικό σημείο
401 · 403 · 404 · 429 · 503