ai
POST /v1/ai/site-builds/{siteBuildId}/preview
What publishing this draft would do to that site. Changes nothing.
Doğrulama
API açarını bearer token kimi göndərin. Açar hosting.deploy.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
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> }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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`.
Parametrlər
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
siteBuildId (path) | Uuid | Bəli | — |
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
site_id | Uuid | Bəli | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
disposition | SiteMakerDisposition | Bəli | What 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… |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
preview | SiteMakerPreview | Bəli | — |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 404 · 422 · 429