hosting
POST /v1/sites/{siteId}/edge-domains/{hostname}/dns
Publish this domain's DNS records for the customer.
احراز هویت
یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز hosting.deploy.manage باشد؛ کلیدی که فاقد آن باشد با خطای 403 رد میشود، نه 404.
این نقطه پایانی هیچ شناسه سازمانی را دریافت نمیکند. کلید شما در حال حاضر سازمان مربوطه را مشخص میکند و پاسخ در همان محدوده ارائه میشود.
امتحان کنید
هر چیزی را که داخل براکتهای زاویهدار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/edge-domains/{hostname}/dns \
-H "Authorization: Bearer zdk_live_…"وارد شدهاید؟ کنسول API در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر میکند و درخواست را روی API زنده اجرا میکند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول API باز کنید
جزئیات
Writes the records and then resolves them, so the answer is what the internet says rather than what we did. Three tiers in order — the customer's own connected DNS provider, then our nameservers with the zone pre-built, then the records to publish by hand — and the tier that was actually used comes back as `mode`. In `nameservers` mode the `nameservers` array is the one thing left for the customer to do. Requires `hosting.deploy.manage`.
پارامترها
| نام | نوع | الزامی | چیست |
|---|---|---|---|
siteId (path) | Uuid | بله | Site ID (UUIDv7). |
hostname (path) | string | بله | The bound hostname, lower-cased and without a trailing dot. |
پاسخ
| نام | نوع | الزامی | چیست |
|---|---|---|---|
hostname | string | بله | — |
mode | string<unknown, our_zone, byo_dns, nameservers, manual> | بله | — |
zone | string | بله | — |
vendor | string | بله | — |
detail | string | بله | — |
nameservers | string[] | بله | Populated only in `nameservers` mode — the zone is built and the records are in it, and setting these at the registrar is the one thing left to do. |
records | DnsRecordPlan[] | بله | — |
checks | DnsRecordCheck[] | بله | — |
resolves | boolean | بله | — |
خطاهایی که این نقطه پایانی میتواند برگرداند
401 · 403 · 404 · 422 · 429