ai
POST /v1/ai/site-builds/{siteBuildId}/preview
What publishing this draft would do to that site. Changes nothing.
Autenticación
Envía una clave de API como token de portador. La clave debe tener el permiso hosting.deploy.manage; una clave que no lo tenga se rechazará con un código 403, no 404.
Este endpoint no requiere ningún id de organización. Su clave ya identifica la organización a la que pertenece, y la respuesta está delimitada a ella.
Pruébalo
Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.
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> }'¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API
Detalles
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`.
Parámetros
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
siteBuildId (path) | Uuid | Sí | — |
Cuerpo de la solicitud
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
site_id | Uuid | Sí | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
disposition | SiteMakerDisposition | Sí | 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… |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
preview | SiteMakerPreview | Sí | — |
Errores que este endpoint puede devolver
401 · 403 · 404 · 422 · 429