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}/deploy \
-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
Starts a durable deploy workflow and returns immediately with the new in-flight state. The target is derived from the site's stack and its connected accounts; there is no target to choose. A site with a deploy already running returns `DEPLOY_IN_PROGRESS`, and one with no usable target returns `DEPLOY_TARGET_UNAVAILABLE`. 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). |
Idempotency-Key (header) | string | Không | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
site_id | Uuid | Có | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
target | DeployTarget | null | Có | Null when no target can be derived yet. |
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. |
last_deployed_at | object | Có | When the site last went live, or null if it never has. Null means nothing to show — never zero and never an epoch date. |
live_url | object | Có | The served URL once live, always https, else null. A non-HTTPS value is rejected server-side rather than returned. |
repo | object | Có | Source repository for the Pages targets, else null. |
commit | object | Có | The deployed commit ref, else null. |
message | object | Có | Why the last deploy failed, else null. Rendered to the customer verbatim. |
can_deploy | boolean | Có | False while a deploy is in flight or the site cannot be deployed. |
Các lỗi điểm cuối này có thể trả về
401 · 403 · 404 · 409 · 422 · 429 · 503