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 ස්ථාන දායකය ප්‍රතිස්ථාපනය කරන්න.

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නැත

පsspil

නමවර්ගයඅත්‍යවශ්‍යයිඑය කුමක්ද
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