hosting

GET /v1/sites/{siteId}/geo-restriction

Which countries may reach this site.

Lahat ng hosting endpoint

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}/geo-restriction \
  -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

The site's country rule and what each enforcement layer is doing about it. **Not under `/cdn/`, deliberately.** A country rule is a *site* control with up to two enforcement points — the CDN edge and the origin server — and a site with no CDN still gets it at the origin. It applies on every product line. **The edge state is read from the provider, not from our record.** "We asked for it" and "it is set" are different claims: they diverge when a customer edits the rule in their own CDN dashboard, after a CDN switch, or after a failed apply. Read `edge` and `origin` separately — a rule live at one layer only is a real, partial state, and `enforcing: false` with a `detail` means the layer is not protecting the site whatever `mode` says. Requires `sites.view`.

Mga Parameter

PangalanUriKailanganAno ito
siteId (path)UuidOoSite ID (UUIDv7).

Tugon

PangalanUriKailanganAno ito
modestring<off, allow, block>Oo`allow` admits **only** the listed countries and refuses everywhere else; `block` refuses the listed ones and serves everywhere else; `off` is no rule at all.
countriesstring[]OoISO-3166 alpha-2, upper-case. Empty when `mode` is `off`.
exempt_search_enginesbooleanOoWhether verified search-engine crawlers were asked to bypass the rule.
search_engines_exempt_at_edgebooleanOoWhether that exemption is actually **in force**, which is not the same as whether it was requested — only a provider that verifies a crawler by forward/reverse DNS can carry it.…
edgeGeoRestrictionLayerOoWhat ONE enforcement layer can do, and what it is doing right now. Four fields rather than one flag because "this provider cannot do it" and "it failed this morning" need differ…
originGeoRestrictionLayerOoWhat ONE enforcement layer can do, and what it is doing right now. Four fields rather than one flag because "this provider cannot do it" and "it failed this morning" need differ…

Mga error na maibabalik ng endpoint na ito

401 · 403 · 404 · 429