hosting

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

Replace a site's whole build environment.

Svi hosting krajnji točke

Autentifikacija

Pošaljite API ključ kao nosivi token. Ključ mora imati dozvolu hosting.deploy.manage; ključ bez nje se odbija s kodom 403, a ne 404.

Ova krajnja točka ne prihvaća ID organizacije. Vaš ključ već identificira organizaciju kojoj pripada, a odgovor je ograničen na nju.

Isprobajte

Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.

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

Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli

Pojedinosti

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

Parametri

NazivVrstaObaveznoŠto je to
siteId (path)UuidDaSite ID (UUIDv7).

Tijelo zahtjeva

NazivVrstaObaveznoŠto je to
variablesobjectDaName 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…

Odgovor

NazivVrstaObaveznoŠto je to
namesstring[]DaThe variable names this site holds, sorted.

Pogreške koje ova krajnja točka može vratiti

401 · 403 · 404 · 422 · 429