hosting
GET /v1/sites/{siteId}/preview-urls
Get the URLs at which a site can be viewed before its DNS resolves.
Autentikasi
Kirim kunci API sebagai token bearer. Kunci tersebut harus memiliki izin sites.view; kunci tanpa izin tersebut akan ditolak dengan status 403, bukan 404.
Endpoint ini tidak memerlukan id organisasi. Kunci Anda telah mengidentifikasi organisasi tempatnya berafiliasi, dan respons akan dibatasi untuk organisasi tersebut.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/preview-urls \
-H "Authorization: Bearer zdk_live_…"Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
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.
Parameter
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
siteId (path) | Uuid | Ya | Site ID (UUIDv7). |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
urls | SitePreviewUrl[] | Ya | Every preview URL the platform serves for this site. |
unavailable_reason | string<, unsupported_driver, none_issued> | Ya | Why there is no usable preview URL, blank when there is one. A stable machine identifier the client localises — never display text. |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 404 · 429 · 503