hosting
POST /v1/sites/{siteId}/edge-domains
Point a domain at this site's deploy target.
प्रमाणीकरण
एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। कुञ्जीसँग hosting.deploy.manage अनुमति हुनुपर्छ; अनुमति नभएको कुञ्जीलाई 404 होइन, 403 मार्फत अस्वीकार गरिन्छ।
यो इन्डपोइन्टले कुनै संस्थाको आइडी लिँदैन। तपाईंको कुञ्जीले यस अन्तर्गत पर्ने संस्थालाई पहिल्यै पहिचान गर्छ, र प्रतिक्रिया त्यसैमा सीमित हुन्छ।
प्रयास गर्नुहोस्
कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/edge-domains \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "hostname": <string> }'लगइन गर्नुभएको छ? तपाईंको ड्यासबोर्डमा रहेको API कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ API विरुद्ध अनुरोध चलाउँछ ताकि तपाईंले वास्तविक प्रतिक्रिया हेर्न सक्नुहोस्। यो एन्डपोइन्टलाई API कन्सोलमा खोल्नुहोस्
विवरणहरू
Attaches the hostname at the provider and, unless `write_dns` is false, publishes its DNS records in the same call — on the customer's own connected DNS account where they have one, otherwise on ours. A DNS failure does not fail the bind: the binding at the provider has already happened, and reporting failure would leave the customer retrying into an "already bound" error. The DNS outcome is on the returned row instead. Requires `hosting.deploy.manage`.
प्यारामिटरहरू
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
siteId (path) | Uuid | हुन्छ | Site ID (UUIDv7). |
अनुरोध बडी
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
hostname | string | हुन्छ | — |
write_dns | boolean | हैन | Publish the DNS records in the same call. Defaults to true because doing the DNS for the customer is the point of this surface; opting out is the unusual request. |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
hostname | string | हुन्छ | — |
is_primary | boolean | हुन्छ | — |
status | string<pending, active, failed> | हुन्छ | The provider's verdict on the binding. |
is_apex | boolean | हुन्छ | Whether this hostname is the zone apex. An apex cannot hold a CNAME, so its record set is provider-specific and sometimes impossible — see `refusal`. |
dns_mode | string<unknown, our_zone, byo_dns, nameservers, manual> | हुन्छ | Which DNS tier this hostname landed on. `unknown` means nothing has been attempted yet and must not be rendered as "no action needed". |
dns_zone | string | हुन्छ | — |
dns_vendor | string | हुन्छ | — |
dns_written_at | string | हुन्छ | — |
resolves | boolean | हुन्छ | Three-valued. `true` every wanted record is live, `false` at least one answered and is wrong, `null` no check has answered. `null` is not `false`. |
last_checked_at | string | हुन्छ | — |
last_check_detail | string | हुन्छ | — |
records | DnsRecordPlan[] | हुन्छ | — |
refusal | string | हुन्छ | Non-empty when no valid record set exists for this hostname at this provider — today, a Cloudflare Pages apex on a zone that is not on Cloudflare DNS, because that provider publ… |
यो इन्डपोइन्टले फर्काउन सक्ने त्रुटिहरू
401 · 403 · 404 · 422 · 429