hosting
PUT /v1/sites/{siteId}/build-env
Replace a site's whole build environment.
Kimlik Doğrulama
Bearer token olarak bir API anahtarı gönderin. Anahtar hosting.deploy.manage iznine sahip olmalıdır; bu izne sahip olmayan bir anahtar 404 ile değil, 403 ile reddedilir.
Bu uç nokta hiçbir organizasyon kimliği almaz. Anahtarınız zaten ait olduğu organizasyonu tanımlar ve yanıt bu organizasyonla sınırlandırılır.
Dene
Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.
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> }'Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın
Ayrıntılar
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`.
Parametreler
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
siteId (path) | Uuid | Evet | Site ID (UUIDv7). |
İstek gövdesi
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
variables | object | Evet | Name 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… |
keep | string[] | Hayır | Names 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… |
Yanıt
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
names | string[] | Evet | The variable names this site holds, sorted. |
Bu uç noktanın dönderebileceği hatalar
401 · 403 · 404 · 422 · 429