hosting
GET /v1/sites/{siteId}/cdn/canonical-host
Which hostname serves, which redirects, and whether HTTPS is forced.
การยืนยันตัวตน
ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ sites.view หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404
ปลายทางนี้ไม่ต้องใช้รหัสองค์กร คีย์ของคุณระบุองค์กรที่เป็นเจ้าของอยู่แล้ว และการตอบกลับจะถูกจำกัดขอบเขตไว้เฉพาะองค์กรนั้น
ทดลองใช้เลย
แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/cdn/canonical-host \
-H "Authorization: Bearer zdk_live_…"เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API
รายละเอียด
Returns the whole serving plan rather than the two stored flags: the host that serves, the host that 301s to it, and every hostname the edge certificate must cover. A client given only canonical_host would have to work out the alias itself, and two implementations of "what is the other hostname" is exactly the drift the engine-owns-policy rule exists to prevent. certificate_hosts always contains both names, and that is the half that is invisible when testing in a browser. TLS is negotiated on the name being redirected from, so a certificate covering only the canonical host puts a full-page security interstitial in front of the alias and the visitor never reaches the redirect at all. Requires sites.view.
พารามิเตอร์
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
siteId (path) | Uuid | ใช่ | Site ID (UUIDv7). |
การตอบกลับ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
canonical_host | string<apex, www> | ใช่ | — |
force_https | boolean | ใช่ | Redirect http to https at the edge. Defaults to true on every new site. |
serves_on | string | ใช่ | The hostname that actually serves. |
redirects_from | string | ใช่ | The hostname that permanently redirects to serves_on. |
redirect_status | integer | ใช่ | Always 301. A 302 tells search engines to keep indexing the alias, which leaves the duplicate-content problem unsolved while looking correct in a browser. |
certificate_hosts | string[] | ใช่ | Both hostnames, always. TLS is negotiated on the name being redirected from, so a certificate covering only serves_on puts a security interstitial in front of the alias and… |
apex_delivery | string<native, alias, a_records, unsupported> | ใช่ | How the zone apex is made to resolve. A bare apex cannot be a CNAME, so on a pull-zone CDN it resolves only through CNAME-flattening/ALIAS at the DNS provider, or through A/AAAA… |
apex_deliverable | boolean | ใช่ | false when neither mechanism is available for this CDN/DNS pairing. The combination is refused rather than accepted, because the alternative provisions cleanly, reports healthy,… |
ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้
401 · 403 · 404 · 422 · 429