ai

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

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

Tutti gli endpoint ai

Autenticazione

Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione hosting.deploy.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.

Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.

Provalo

Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.

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> }'

Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API

Dettagli

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`.

Parametri

NomeTipoObbligatorioChe cos'è
siteBuildId (path)Uuid

Corpo della richiesta

NomeTipoObbligatorioChe cos'è
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…

Risposta

NomeTipoObbligatorioChe cos'è
previewSiteMakerPreview

Errori che questo endpoint può restituire

401 · 403 · 404 · 422 · 429