hosting

PUT /v1/sites/{siteId}/repo

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

จุดสิ้นสุด hosting ทั้งหมด

การยืนยันตัวตน

ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ hosting.deploy.manage หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404

ปลายทางนี้ไม่ต้องใช้รหัสองค์กร คีย์ของคุณระบุองค์กรที่เป็นเจ้าของอยู่แล้ว และการตอบกลับจะถูกจำกัดขอบเขตไว้เฉพาะองค์กรนั้น

ทดลองใช้เลย

แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ

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