hosting

PUT /v1/sites/{siteId}/repo

Connect (or re-connect) a repository to a site.

सभी hosting एंडपॉइंट्स

प्रमाणन

बेरर टोकन के रूप में एक API कुंजी भेजें। कुंजी के पास hosting.deploy.manage अनुमति होनी चाहिए; इसके बिना एक कुंजी को 404 के बजाय 403 के साथ अस्वीकार कर दिया जाता है।

यह एंडपॉइंट कोई संगठन आईडी नहीं लेता है। आपकी कुंजी पहले से ही उस संगठन की पहचान करती है जिससे वह संबंधित है, और प्रतिक्रिया उसी के दायरे में है।

इसे आज़माएँ

कोणार्कित ब्रैकेट्स में दी गई किसी भी चीज़ को अपने मानों से बदलें, और की प्लेसहोलर को अपने डैशबोर्ड की एक की से बदलें।

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/repo \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "provider": <string>, "repo": <string> }'

साइन इन हैं? आपके डैशबोर्ड में मौजूद API कंसोल आपकी वास्तविक संगठन आईडी और आपकी अपनी कुंजी स्वतः भर देता है, और लाइव API के विरुद्ध अनुरोध चलाता है ताकि आप वास्तविक प्रतिक्रिया देख सकें। इस एंडपॉइंट को API कंसोल में खोलें

विवरण

Confirms the repository exists on the connected account, stores the connection, and creates or updates the provider-side push webhook — and, when `build_mode` is `ci`, commits the Zinn® build workflow to the repository. The provider work happens before the row is reported as connected, so a hook that could not be created never leaves a row claiming it was. Requires `hosting.deploy.manage`.

पैरामीटर

नामप्रकारआवश्यकयह क्या है
siteId (path)UuidहाँSite ID (UUIDv7).

अनुरोध बॉडी

नामप्रकारआवश्यकयह क्या है
providerstringहाँ
ownerstringनहीं
repostringहाँ
branchstringनहीं
build_modeBuildModeनहींHow the published files are produced. `publish` serves the repository's own files — right for plain HTML and for a repo whose generator output is committed. `ci` runs the build…
build_commandstringनहीं
output_dirstringनहीं
publish_branchstringनहीं
auto_deploybooleanनहीं

प्रतिक्रिया

नामप्रकारआवश्यकयह क्या है
site_idUuidहाँUUIDv7 identifier — sortable by creation time (docs/02 §8).
providerstringहाँThe git provider — `github` or `gitlab`. A machine identifier.
ownerstringहाँThe account or namespace the repository lives under.
repostringहाँ
full_namestringहाँ`owner/repo`, or just the repo when the account owns its namespace.
branchstringहाँThe branch a push deploys from.
build_modeBuildModeहाँHow the published files are produced. `publish` serves the repository's own files — right for plain HTML and for a repo whose generator output is committed. `ci` runs the build…
build_commandstringहाँBlank in `publish` mode — a stored command nothing runs would read as a build.
output_dirstringहाँWhich directory is published. Blank means the repository root.
publish_branchstringहाँWhere CI commits the built output in `ci` mode.
auto_deploybooleanहाँWhether a push deploys automatically. Off still records every delivery, so a customer can watch pushes arriving before letting us act on them.
webhook_urlstringहाँThe URL the provider was told to deliver to. Computed, never stored — a stored copy would keep naming the origin that was current when the row was written. Blank on an environme…
webhook_registeredbooleanहाँWhether a provider-side hook actually exists. False here with a connection present means pushes are NOT being watched.
last_delivery_atobjectहाँWhen the provider last delivered anything, or null for NEVER. Null is the single most useful diagnostic on this screen: "connected but never delivered" is what a mis-scoped toke…
last_delivery_notestringहाँWhat we did with the last delivery, including when we ignored it. Written for every delivery, because "never delivered" and "delivering, ignored" are different problems with dif…
connected_accountstringहाँThe label of the credential connection this repository is read with.

त्रुटियाँ जो यह एंडपॉइंट लौटा सकता है

401 · 403 · 404 · 422 · 429