hosting
POST /v1/sites/{siteId}/deployments/{deploymentId}/redeploy
Roll back by re-publishing an earlier deploy's commit.
Xác thực
Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền hosting.deploy.manage; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.
Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.
Dùng thử
Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/deployments/{deploymentId}/redeploy \
-H "Authorization: Bearer zdk_live_…"Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API
Chi tiết
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`.
Tham số
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
siteId (path) | Uuid | Có | Site ID (UUIDv7). |
deploymentId (path) | Uuid | Có | Deployment ID (UUIDv7). |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
id | Uuid | Có | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
site_id | Uuid | Có | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
target | DeployTarget | Có | 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 | Có | `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 | Có | 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 | Có | — |
branch | object | Có | — |
commit | object | Có | — |
commit_message | object | Có | — |
live_url | object | Có | — |
message | object | Có | Why it failed, else null. Rendered to the customer verbatim. |
requested_by | string | Có | — |
created_at | string | Có | — |
started_at | object | Có | — |
finished_at | object | Có | — |
log | string | Có | 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. |
Các lỗi điểm cuối này có thể trả về
401 · 403 · 404 · 409 · 422 · 429 · 503