hosting

PUT /v1/sites/{siteId}/repo

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

सर्व hosting एंडपॉइंट्स

प्रमाणीकरण

बेरर टोकन म्हणून API की पाठवा. की मध्ये hosting.deploy.manage परवानगी असणे आवश्यक आहे; ती नसलेली की 404 ऐवजी 403 सह नाकारली जाते.

या एंडपॉइंटला कोणतीही संस्था आयडी (organisation id) लागत नाही. तुमची की (key) आधीच ती कोणत्या संस्थेशी संबंधित आहे हे ओळखते आणि प्रतिसाद त्यानुसार मर्यादित केला जातो.

प्रयत्न करा

कोनसांस्कृतिक कंसात (<>) असलेली कोणतीही गोष्ट तुमच्या स्वतःच्या मूल्यांनी बदला आणि key प्लेसहोल्डरला तुमच्या डॅशबोर्डवरील किने बदला.

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 विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा

तपशील

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