hosting

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

Replace a site's whole build environment.

Všechny koncové body hosting

Autentizace

Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění hosting.deploy.manage; klíč bez něj je odmítnut s kódem 403, nikoli 404.

Tento koncový bod nevyžaduje žádné ID organizace. Váš klíč již identifikuje organizaci, ke které patří, a odpověď je na ni omezena.

Vyzvednout

Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.

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

Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API

Podrobnosti

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

Parametry

NázevTypPožadovánoCo to je
siteId (path)UuidAnoSite ID (UUIDv7).

Tělo požadavku

NázevTypPožadovánoCo to je
variablesobjectAnoName 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[]NeNames 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…

Odpověď

NázevTypPožadovánoCo to je
namesstring[]AnoThe variable names this site holds, sorted.

Chyby, které může tento koncový bod vrátit

401 · 403 · 404 · 422 · 429