hosting

GET /v1/sites/{siteId}/preview-urls

Get the URLs at which a site can be viewed before its DNS resolves.

Lahat ng hosting endpoint

Pagpapatotoo

Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na sites.view; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.

Ang endpoint na ito ay hindi nangangailangan ng id ng organisasyon. Natutukoy na ng iyong key ang organisasyong kinabibilangan nito, at nakatuon ang tugon dito.

Subukan ito

Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.

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

Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API

Mga Detalye

How a customer sees their site **before** they point their domain at us — the "temporary URL" the product has advertised on both lines since the first feature matrix (docs/37) and the import flow tells them to use ("Check it over, then point your domain at us"). Requires `sites.view`. Every hostname is **read from the hosting platform, never derived**: they are not uniformly `<label>.<preview-domain>` and a formula produces confidently wrong links (one live package answers with a datacentre label in the middle of the hostname). `vendor_branded` marks a URL whose hostname is not under our configured preview domain — a docs/62 §3.7 breach. Such a URL is reported so staff can see it, and **must not be offered to a customer** by any client. A site with no preview URL returns `200` with an empty `urls` and a machine-readable `unavailable_reason` — that is an answer, not an error, and it is the answer for a site on our own fleet (`unsupported_driver`) as well as for a hosted site the vendor issued nothing for (`none_issued`). ⛔ A fleet site is deliberately **not** a `404` here, unlike the `/hosting/*` reads: a vendor package is a property of the vendor, so a site without one has no such resource, but a preview URL is a property of the site and "this platform cannot mint one yet" is something the customer is owed.

Mga Parameter

PangalanUriKailanganAno ito
siteId (path)UuidOoSite ID (UUIDv7).

Tugon

PangalanUriKailanganAno ito
urlsSitePreviewUrl[]OoEvery preview URL the platform serves for this site.
unavailable_reasonstring<, unsupported_driver, none_issued>OoWhy there is no usable preview URL, blank when there is one. A stable machine identifier the client localises — never display text.

Mga error na maibabalik ng endpoint na ito

401 · 403 · 404 · 429 · 503