ai

POST /v1/ai/site-builds/{siteBuildId}/preview

What publishing this draft would do to that site. Changes nothing.

Tất cả các điểm cuối ai

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/ai/site-builds/{siteBuildId}/preview \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "site_id": <Uuid>, "disposition": <SiteMakerDisposition> }'

Đã đă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

Answers "what happens if the site is already there" before anything happens: which existing files are kept, which are added, which would be **overwritten**, and which generated files would be renamed to avoid a collision. This runs the same guard the publication itself runs, not a second description of it. A preview computed by different code is a promise the real path never made, and it would be wrong in exactly the cases that matter. The preview does **not** require the typed confirmation that a `replace` needs. A customer has to be able to see what would be destroyed before deciding to confirm it; demanding the confirmation in order to show the consequence is the wrong way round. Requires `hosting.deploy.manage`.

Tham số

TênLoạiBắt buộcNội dung này là gì
siteBuildId (path)Uuid

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
site_idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
dispositionSiteMakerDispositionWhat to do with what is already on the destination. `add_to` keeps every existing byte, `revamp` replaces presentation and keeps content, `replace` is destructive and requires a…

Phản hồi

TênLoạiBắt buộcNội dung này là gì
previewSiteMakerPreview

Các lỗi điểm cuối này có thể trả về

401 · 403 · 404 · 422 · 429