hosting

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

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

Svi hosting krajnji točke

Sva developerska dokumentacija

Autentifikacija

Pošaljite API ključ kao nosivi token. Ključ mora imati dozvolu sites.view; ključ bez nje se odbija s kodom 403, a ne 404.

Ova krajnja točka ne prihvaća ID organizacije. Vaš ključ već identificira organizaciju kojoj pripada, a odgovor je ograničen na nju.

Isprobajte

Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.

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

Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli

Pojedinosti

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.

Parametri

NazivVrstaObaveznoŠto je to
siteId (path)UuidDaSite ID (UUIDv7).

Odgovor

NazivVrstaObaveznoŠto je to
canonical_hoststring<apex, www>Da
force_httpsbooleanDaRedirect http to https at the edge. Defaults to true on every new site.
serves_onstringDaThe hostname that actually serves.
redirects_fromstringDaThe hostname that permanently redirects to serves_on.
redirect_statusintegerDaAlways 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[]DaBoth 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_deliverystring<native, alias, a_records, unsupported>DaHow 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_deliverablebooleanDafalse when neither mechanism is available for this CDN/DNS pairing. The combination is refused rather than accepted, because the alternative provisions cleanly, reports healthy,…

Pogreške koje ova krajnja točka može vratiti

401 · 403 · 404 · 422 · 429