hosting
PUT /v1/sites/{siteId}/build-env
Replace a site's whole build environment.
प्रमाणीकरण
बेरर टोकन म्हणून API की पाठवा. की मध्ये hosting.deploy.manage परवानगी असणे आवश्यक आहे; ती नसलेली की 404 ऐवजी 403 सह नाकारली जाते.
या एंडपॉइंटला कोणतीही संस्था आयडी (organisation id) लागत नाही. तुमची की (key) आधीच ती कोणत्या संस्थेशी संबंधित आहे हे ओळखते आणि प्रतिसाद त्यानुसार मर्यादित केला जातो.
प्रयत्न करा
कोनसांस्कृतिक कंसात (<>) असलेली कोणतीही गोष्ट तुमच्या स्वतःच्या मूल्यांनी बदला आणि key प्लेसहोल्डरला तुमच्या डॅशबोर्डवरील किने बदला.
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> }'साइन इन केलेले आहे? तुमच्या डॅशबोर्डमधील API कन्सोल तुमची खरी संस्था आयडी आणि तुमची स्वतःची की आपोआप भरतो आणि लाइव्ह API विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा
तपशील
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.
पॅरामीटर्स
| नाव | प्रकार | आवश्यक | हे काय आहे |
|---|---|---|---|
siteId (path) | Uuid | होय | Site ID (UUIDv7). |
विनंती मुख्य भाग
| नाव | प्रकार | आवश्यक | हे काय आहे |
|---|---|---|---|
variables | object | होय | 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 one… |
keep | string[] | नाही | 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… |
प्रतिसाद
| नाव | प्रकार | आवश्यक | हे काय आहे |
|---|---|---|---|
names | string[] | होय | The variable names this site holds, sorted. |
applied | boolean | नाही | Present only on a save to a Node.js, Python or Ruby site on our own servers: true means the running application received the variables and was restarted, false that it is not… |
ही एंडपॉइंट परत करू शकेल अशा त्रुटी
401 · 403 · 404 · 422 · 429