hosting
PUT /v1/sites/{siteId}/repo
Connect (or re-connect) a repository to a site.
စစ်မှန်ကြောင်း အတည်ပြုခြင်း
API သော့တစ်ခုကို bearer token အဖြစ် ပို့ပါ။ သော့တွင် hosting.deploy.manage ခွင့်ပြုချက် ပါရှိရမည်ဖြစ်ပြီး၊ ၎င်းမပါရှိသော သော့ကို 404 အစား 403 ဖြင့် ငြင်းပယ်ပါမည်။
ဤ အမှတ်ဆက် (endpoint) သည် အဖွဲ့အစည်း အိုင်ဒီ (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 ကွန်ဆိုးလ်တွင် သင့်၏ တကယ့်အဖွဲ့အစည်း ID နှင့် သင့်ကိုယ်ပိုင်သော့ချက်တို့ဖြင့် ဖြည့်သွင်းပေးပြီး တကယ့်တုံ့ပြန်ချက်ကို သင်မြင်နိုင်ရန် တိုက်ရိုက် API (live API) ကို အသုံးပြု၍ တောင်းဆိုမှုကို လုပ်ဆောင်ပေးပါသည်။ ဤအဆုံးသတ်အမှတ် (endpoint) ကို 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). |
တောင်းဆိုချက် ကိုယ်ထည်
| နာမည် | အမျိုးအစား | လိုအပ်သည် | ဘာလဲဆိုတာ |
|---|---|---|---|
provider | string | ဟုတ်ကဲ့ | — |
owner | string | မဟုတ်ပါ | — |
repo | string | ဟုတ်ကဲ့ | — |
branch | string | မဟုတ်ပါ | — |
build_mode | BuildMode | မဟုတ်ပါ | 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_command | string | မဟုတ်ပါ | — |
output_dir | string | မဟုတ်ပါ | — |
publish_branch | string | မဟုတ်ပါ | — |
auto_deploy | boolean | မဟုတ်ပါ | — |
တုံ့ပြန်ချက်
| နာမည် | အမျိုးအစား | လိုအပ်သည် | ဘာလဲဆိုတာ |
|---|---|---|---|
site_id | Uuid | ဟုတ်ကဲ့ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
provider | string | ဟုတ်ကဲ့ | The git provider — github or gitlab. A machine identifier. |
owner | string | ဟုတ်ကဲ့ | The account or namespace the repository lives under. |
repo | string | ဟုတ်ကဲ့ | — |
full_name | string | ဟုတ်ကဲ့ | owner/repo, or just the repo when the account owns its namespace. |
branch | string | ဟုတ်ကဲ့ | The branch a push deploys from. |
build_mode | BuildMode | ဟုတ်ကဲ့ | 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_command | string | ဟုတ်ကဲ့ | Blank in publish mode — a stored command nothing runs would read as a build. |
output_dir | string | ဟုတ်ကဲ့ | Which directory is published. Blank means the repository root. |
publish_branch | string | ဟုတ်ကဲ့ | Where CI commits the built output in ci mode. |
auto_deploy | boolean | ဟုတ်ကဲ့ | Whether a push deploys automatically. Off still records every delivery, so a customer can watch pushes arriving before letting us act on them. |
webhook_url | string | ဟုတ်ကဲ့ | 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 environment… |
webhook_registered | boolean | ဟုတ်ကဲ့ | Whether a provider-side hook actually exists. False here with a connection present means pushes are NOT being watched. |
last_delivery_at | object | ဟုတ်ကဲ့ | 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 token… |
last_delivery_note | string | ဟုတ်ကဲ့ | 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… |
connected_account | string | ဟုတ်ကဲ့ | The label of the credential connection this repository is read with. |
ဤအမှတ်ဆက်မှ ပြန်ပေးနိုင်သော အမှားများ
401 · 403 · 404 · 422 · 429