hosting

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

Which countries may reach this site.

Всички крайни точки в hosting

Всички документи за разработчици

Упълномощаване

Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението sites.view; ключ без него се отхвърля с 403, а не с 404.

Този ендпойнт не изисква идентификатор на организация. Вашият ключ вече идентифицира организацията, към която принадлежи, и отговорът е ограничен до нея.

Опитайте

Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.

curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/geo-restriction \
  -H "Authorization: Bearer zdk_live_…"

Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата

Детайли

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.

Параметри

ИмеТипЗадължителноКакво представлява
siteId (path)UuidДаSite ID (UUIDv7).

Отговор

ИмеТипЗадължителноКакво представлява
modestring<off, allow, block>Да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[]ДаISO-3166 alpha-2, upper-case. Empty when mode is off.
exempt_search_enginesbooleanДаWhether verified search-engine crawlers were asked to bypass the rule.
search_engines_exempt_at_edgebooleanДаWhether 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.…
edgeGeoRestrictionLayerДаWhat 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…
originGeoRestrictionLayerДаWhat 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…

Грешки, които този крайpoint може да върне

401 · 403 · 404 · 429