hosting

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

Replace a site's whole build environment.

Todos os endpoints de hosting

Autenticação

Envie uma chave de API como um token de portador. A chave deve ter a permissão hosting.deploy.manage; uma chave sem ela é recusada com 403, e não 404.

Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.

Experimente

Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.

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

Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API

Detalhes

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

NomeTipoObrigatórioO que é
siteId (path)UuidSimSite ID (UUIDv7).

Corpo da requisição

NomeTipoObrigatórioO que é
variablesobjectSimName 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[]NãoNames 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…

Resposta

NomeTipoObrigatórioO que é
namesstring[]SimThe variable names this site holds, sorted.

Erros que este endpoint pode retornar

401 · 403 · 404 · 422 · 429