hosting
POST /v1/sites/{siteId}/previews
Build a branch as a preview, without touching the live site.
Ìfàṣẹ́pọ̀
Fi bọ́ọ̀lù (bearer token) ranṣẹ gẹ́gẹ́ bí kọ́kọ́rọ́ API. Kọ́kọ́rọ́ náà gbọ́dọ̀ ní ìyọ̀ǹda hosting.deploy.manage; a ó kọ̀ ọ́ silẹ pẹlu 403, kii ṣe 404, ti kọ́kọ́rọ́ náà kò bá ní i.
Ojú abánisọ̀rọ̀ yìí kò gba id ajọ kankan. Kọ́kọ́rọ́ rẹ ti mọ ajọ ti o jẹ ti e, a o si fèsì nipa rẹ̀.
Gbiyanju rẹ
Rọ́pọ̀ èyíkéyìí nínú àwọn àmì ìtọ́ka < > pẹ̀lú iye tirẹ̀, àti àmì ìdánimọ̀ bọ́tìnnì náà pẹ̀lú bọ́tìnnì kan láti inú dásibọ̀ọ̀dù rẹ.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/previews \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "branch": <string> }'Ṣé o ti wọlé? Iwọ̀n api ní nú ìgbékalẹ̀ rẹ kún id àjọ gidi rẹ ati bọtini tirẹ, o si nṣiṣẹ ibeere na lòdì si api gidi ki o le rii esi gidi na. Ṣí ojú abáná yìí sílẹ̀ nínú kọnsólù API
Àwọn kúlẹ̀kúlẹ̀
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`.
Àwọn ìpìlẹ̀
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
siteId (path) | Uuid | Bẹẹni | Site ID (UUIDv7). |
Akoonu ibeere naa
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
branch | string | Bẹẹni | The branch to build as a preview. Must not be the branch the site already serves — that would be a normal deploy. |
Idahun
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
id | Uuid | Bẹẹni | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
site_id | Uuid | Bẹẹni | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
target | DeployTarget | Bẹẹni | Where 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… |
status | DeployStatus | Bẹẹni | `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. |
trigger | DeployTrigger | Bẹẹni | What caused the deploy. Stored because `requested_by` cannot answer it for a push — the actor there is a webhook delivery, not a person. |
repo | object | Bẹẹni | — |
branch | object | Bẹẹni | — |
commit | object | Bẹẹni | — |
commit_message | object | Bẹẹni | — |
live_url | object | Bẹẹni | — |
message | object | Bẹẹni | Why it failed, else null. Rendered to the customer verbatim. |
requested_by | string | Bẹẹni | — |
created_at | string | Bẹẹni | — |
started_at | object | Bẹẹni | — |
finished_at | object | Bẹẹni | — |
log | string | Bẹẹni | The build log, one timestamped line per step. Truncated from the FRONT when long — the end of a build log is where the failure is. |
Awọn aṣiṣe ti ibudo ipari yii le da pada
401 · 403 · 404 · 409 · 422 · 429 · 503