hosting

PUT /v1/sites/{siteId}/build-env

Replace a site's whole build environment.

Todos los endpoints de hosting

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 PUT https://api.zinndigital.com/v1/sites/{siteId}/build-env \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "variables": <object> }'

¿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

Replaces rather than merges, because that is the only shape in which DELETING a variable is expressible — merge semantics would make a rotated-out key undeletable, and it would keep reaching the customer's builds from a screen that no longer lists it. An empty `variables` object clears them all. Names must be POSIX environment-variable syntax and may not start with a prefix the build platform owns (`CF_PAGES`, `GITHUB_`). Requires `hosting.deploy.manage`.

Parámetros

NombreTipoObligatorio¿Qué es esto?
siteId (path)UuidSite ID (UUIDv7).

Cuerpo de la solicitud

NombreTipoObligatorio¿Qué es esto?
variablesobjectName to new value, for the variables being set or replaced. A mapping rather than a list of key/value objects because a mapping cannot express a duplicate name — two rows with o…
keepstring[]NoNames to retain unchanged. A name here that the store does not hold is ignored rather than refused — it means the variable was deleted elsewhere, and failing the whole save over…

Respuesta

NombreTipoObligatorio¿Qué es esto?
namesstring[]The variable names this site holds, sorted.

Errores que este endpoint puede devolver

401 · 403 · 404 · 422 · 429