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 زنده اجرا می‌کند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول 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…

خطاهایی که این نقطه پایانی می‌تواند برگرداند

401 · 403 · 404 · 429