hosting

POST /v1/sites/{siteId}/previews

Build a branch as a preview, without touching the live site.

Sve hosting krajnje tačke

Autentifikacija

Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu hosting.deploy.manage; ključ bez nje se odbija sa 403, a ne sa 404.

Ovaj krajnji tačka ne prihvata ID organizacije. Vaš ključ već identifikuje organizaciju kojoj pripada, a odgovor je ograničen na nju.

Isprobajte

Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/previews \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "branch": <string> }'

Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli

Detalji

A preview NEVER binds the site's hostname: it is reachable at the provider's own per-deployment URL and nowhere else, which is the whole promise of a preview. Previewing the branch the site already serves is refused rather than quietly promoted to a production deploy. Requires `hosting.deploy.manage`.

Parametri

NazivVrstaObaveznoŠta je ovo
siteId (path)UuidDaSite ID (UUIDv7).

Telo zahteva

NazivVrstaObaveznoŠta je ovo
branchstringDaThe branch to build as a preview. Must not be the branch the site already serves — that would be a normal deploy.

Odgovor

NazivVrstaObaveznoŠta je ovo
idUuidDaUUIDv7 identifier — sortable by creation time (docs/02 §8).
site_idUuidDaUUIDv7 identifier — sortable by creation time (docs/02 §8).
targetDeployTargetDaWhere the site is published from. `fleet` is our own managed fleet; the rest are managed edge hosts, deployed to from a pooled account of ours or the customer's own connected on…
statusDeployStatusDa`idle` means the site has never been deployed. It is reported, never stored — a stored idle would be a second way to say "no deployments" that could contradict the first.
triggerDeployTriggerDaWhat caused the deploy. Stored because `requested_by` cannot answer it for a push — the actor there is a webhook delivery, not a person.
repoobjectDa
branchobjectDa
commitobjectDa
commit_messageobjectDa
live_urlobjectDa
messageobjectDaWhy it failed, else null. Rendered to the customer verbatim.
requested_bystringDa
created_atstringDa
started_atobjectDa
finished_atobjectDa
logstringDaThe build log, one timestamped line per step. Truncated from the FRONT when long — the end of a build log is where the failure is.

Greške koje ovaj krajnji tačka može da vrati

401 · 403 · 404 · 409 · 422 · 429 · 503