hosting
POST /v1/sites/{siteId}/previews
Build a branch as a preview, without touching the live site.
සත්යාපනය
බෙරර් ටෝකනයක් ලෙස API යතුරක් යවන්න. යතුරෙහි hosting.deploy.manage අවසරය තිබිය යුතුය; එය නොමැති යතුරක් 404 ලෙස නොව 403 ලෙස ප්රතික්ෂේප කෙරේ.
මෙම අවසාන ලක්ෂ්යය සඳහා සංවිධාන හැඳුනුම්පතක් (organisation id) අවශ්ය නොවේ. ඔබගේ යතුර මඟින් එය අයත් වන සංවිධානය දැනටමත් හඳුනා ගන්නා අතර, ප්රතිචාරය ඒ වෙත සීමා වේ.
උත්සාහ කරන්න
<අගයන්> සමඟ කෝණික වරහන් තුළ ඇති ඕනෑම දෙයක් සහ ඔබේ උපකරණ පුවරුවෙන් ලබාගත් යතුරක් සමඟ key ස්ථාන දායකය ප්රතිස්ථාපනය කරන්න.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/previews \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "branch": <string> }'පද්ධතියට පිවිස සිටිනවාද? ඔබගේ උපකරණ පුවරුවේ ඇති API කොන්සෝලය මඟින් ඔබේ සැබෑ ආයතනික හැඳුනුම්පත සහ ඔබේම යතුර පුරවා, සජීවී API වෙත ඉල්ලීම ක්රියාත්මක කරන බැවින් ඔබට සැබෑ ප්රතිචාරය දැකගත හැක. මෙම අග්රලක්ෂ්යය API කොන්සෝලය තුළ විවෘත කරන්න
විස්තර
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`.
පරාමිතීන්
| නම | වර්ගය | අත්යවශ්යයි | එය කුමක්ද |
|---|---|---|---|
siteId (path) | Uuid | ඔව් | Site ID (UUIDv7). |
ඉල්ලුම් පත්ර ශරීරය
| නම | වර්ගය | අත්යවශ්යයි | එය කුමක්ද |
|---|---|---|---|
branch | string | ඔව් | The branch to build as a preview. Must not be the branch the site already serves — that would be a normal deploy. |
පsspil
| නම | වර්ගය | අත්යවශ්යයි | එය කුමක්ද |
|---|---|---|---|
id | Uuid | ඔව් | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
site_id | Uuid | ඔව් | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
target | DeployTarget | ඔව් | 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 | ඔව් | `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 | ඔව් | 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 | ඔව් | — |
branch | object | ඔව් | — |
commit | object | ඔව් | — |
commit_message | object | ඔව් | — |
live_url | object | ඔව් | — |
message | object | ඔව් | Why it failed, else null. Rendered to the customer verbatim. |
requested_by | string | ඔව් | — |
created_at | string | ඔව් | — |
started_at | object | ඔව් | — |
finished_at | object | ඔව් | — |
log | string | ඔව් | 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. |
මෙම අවසාන ලක්ෂ්යය ආපසු ලබා දිය හැකි දෝෂ
401 · 403 · 404 · 409 · 422 · 429 · 503