hosting

GET /v1/sites/{siteId}/cdn/canonical-host

Which hostname serves, which redirects, and whether HTTPS is forced.

모든 hosting 엔드포인트

인증

Bearer 토큰으로 API 키를 전송하세요. 키는 반드시 sites.view 권한을 가지고 있어야 하며, 권한이 없는 키는 404가 아닌 403으로 거부됩니다.

이 엔드포인트는 조직 ID를 받지 않습니다. 사용자의 키가 이미 속한 조직을 식별하며, 응답은 해당 조직으로 한정됩니다.

무료 체험하기

대괄호 안에 있는 모든 내용을 사용자 지정 값으로 바꾸고, 키 플레이스홀더는 대시보드의 키로 바꾸세요.

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

로그인하셨나요? 대시보드의 API 콘솔이 실제 조직 ID와 본인의 키를 자동으로 채우고 라이브 API를 대상으로 요청을 실행하므로 실제 응답을 확인할 수 있습니다. API 콘솔에서 이 엔드포인트를 여세요

상세 정보

Returns the whole serving plan rather than the two stored flags: the host that serves, the host that `301`s 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)UuidSite ID (UUIDv7).

응답

이름유형필수설명
canonical_hoststring<apex, www>
force_httpsbooleanRedirect http to https at the edge. Defaults to true on every new site.
serves_onstringThe hostname that actually serves.
redirects_fromstringThe hostname that permanently redirects to `serves_on`.
redirect_statusintegerAlways 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_hostsstring[]**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 an…
apex_deliverystring<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/AA…
apex_deliverableboolean`false` when neither mechanism is available for this CDN/DNS pairing. The combination is refused rather than accepted, because the alternative provisions cleanly, reports health…

이 엔드포인트가 반환할 수 있는 오류

401 · 403 · 404 · 422 · 429