hosting
GET /v1/sites/{siteId}/preview-urls
Get the URLs at which a site can be viewed before its DNS resolves.
Πισtoποίηση
Στείλτε ένα κλειδί API ως διακριτικό φορέα (bearer token). Το κλειδί πρέπει να διαθέτει το δικαίωμα sites.view· ένα κλειδί που δεν το διαθέτει απορρίπτεται με 403, όχι 404.
Αυτό το τελικό σημείο δεν δέχεται αναγνωριστικό οργανισμού. Το κλειδί σας προσδιορίζει ήδη τον οργανισμό στον οποίο ανήκει, και η απάντηση περιορίζεται σε αυτόν.
Δοκιμάστε το
Ατικatastήstε ό,τι βρίskεtai μέσα σe γώniaδeς μe τis δikές sas timές, kai to placeholder klεidioύ μe éna klεidi apó ton pinaka ελέgchou sas.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/preview-urls \
-H "Authorization: Bearer zdk_live_…"Συνδεθήκατε; Η κονσόλα API στον πίνακα ελέγχου σας συμπληρώνει το πραγματικό αναγνωριστικό του οργανισμού σας και το δικό σας κλειδί, και εκτελεί το αίτημα στο ζωντανό API, ώστε να μπορείτε να δείτε την πραγματική απόκριση. Ανοίξτε αυτό το τελικό σημείο στην κονσόλα API
Λεπτομέρειες
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. ⛔ 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 the reason it has none is something the customer is owed. Since W41-L a site on our own fleet has a real preview address of its own, minted under our preview domain and served over HTTPS, so unsupported_driver no longer describes the fleet. The reasons now mean: not_needed — the site is already reachable at its own address, which is the answer once the customer's domain points at us (⚖️ owner, 2026-09-08: "no one needs a preview url for something that is already pointing to us"); none_issued — the address is decided but not yet published, or a resold package's temporary URL is switched off; unsupported_driver — the site runs somewhere this platform cannot mint one, such as an edge host. ⭐ A platform preview address is a converged state, not an issuance: it is withdrawn a fortnight after the customer's own domain starts reaching us, and it comes back on its own if their DNS later moves away again. platform and retires_at on each URL are what a client needs to say which of those is true.
Παράμετροι
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
siteId (path) | Uuid | Ναι | Site ID (UUIDv7). |
Απάντηση
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
urls | SitePreviewUrl[] | Ναι | Every preview URL the platform serves for this site. |
unavailable_reason | string<, unsupported_driver, none_issued, not_needed> | Ναι | Why there is no usable preview URL, blank when there is one. A stable machine identifier the client localises — never display text. |
Σφάλματα που μπορεί να επιστρέψει αυτό το τελικό σημείο
401 · 403 · 404 · 429 · 503