hosting
POST /v1/sites/{siteId}/deployments/{deploymentId}/redeploy
Roll back by re-publishing an earlier deploy's commit.
Pagpapatotoo
Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na hosting.deploy.manage; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.
Ang endpoint na ito ay hindi nangangailangan ng id ng organisasyon. Natutukoy na ng iyong key ang organisasyong kinabibilangan nito, at nakatuon ang tugon dito.
Subukan ito
Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/deployments/{deploymentId}/redeploy \
-H "Authorization: Bearer zdk_live_…"Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API
Mga Detalye
Rollback is a forward deploy of the recorded commit, not a provider-side pointer move — a provider rollback promotes a deployment that provider still holds, so it silently does nothing once that has expired, behaves differently on each backend, and leaves our history naming a commit the site is not on. A deployment with no recorded commit returns `UNPROCESSABLE_ENTITY`. Requires `hosting.deploy.manage`.
Mga Parameter
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
siteId (path) | Uuid | Oo | Site ID (UUIDv7). |
deploymentId (path) | Uuid | Oo | Deployment ID (UUIDv7). |
Tugon
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
id | Uuid | Oo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
site_id | Uuid | Oo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
target | DeployTarget | Oo | 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 | Oo | `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 | Oo | 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 | Oo | — |
branch | object | Oo | — |
commit | object | Oo | — |
commit_message | object | Oo | — |
live_url | object | Oo | — |
message | object | Oo | Why it failed, else null. Rendered to the customer verbatim. |
requested_by | string | Oo | — |
created_at | string | Oo | — |
started_at | object | Oo | — |
finished_at | object | Oo | — |
log | string | Oo | 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. |
Mga error na maibabalik ng endpoint na ito
401 · 403 · 404 · 409 · 422 · 429 · 503