hosting
GET /v1/sites/{siteId}/cdn/statistics
Edge hits, bytes and country breakdown for a site.
Pagpapatotoo
Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na sites.view; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.
Ang endpoint na ito ay hindi nangangailangan ng id ng organisasyon. Natutukoy na ng iyong key ang organisasyong kinabibilangan nito, at nakatuon ang tugon dito.
Subukan ito
Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/cdn/statistics \
-H "Authorization: Bearer zdk_live_…"Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API
Mga Detalye
Points are returned in the vendor's own buckets and in time order, not re-aggregated: re-bucketing would invent numbers the CDN did not measure. Requires `sites.view`.
Mga Parameter
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
siteId (path) | Uuid | Oo | Site ID (UUIDv7). |
window (query) | string<Last24Hours, Last30Days, Last12Months> | Hindi | Which bucket of hits and bytes to return. |
period (query) | string<Last1Hour, Last24Hours, Last7Days> | Hindi | Which window the country breakdown covers. ⛔ **A different vocabulary from `window`** — the two vendor endpoints underneath do not share one, and `Last30Days` is a valid `window… |
Tugon
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
window | string | Oo | — |
windows | string[] | Oo | — |
hits | SiteCdnPoint[] | Oo | — |
bytes | SiteCdnPoint[] | Oo | — |
period | string | Oo | The window the country breakdown covers, or empty when the requested `period` is not one this vendor endpoint accepts. |
periods | string[] | Oo | — |
countries | SiteCdnCountry[] | Oo | — |
Mga error na maibabalik ng endpoint na ito
401 · 403 · 404 · 422 · 429 · 503