hosting
POST /v1/sites/{siteId}/repo/sync/run
Sync this site with its repository now.
සත්යාපනය
බෙරර් ටෝකනයක් ලෙස API යතුරක් යවන්න. යතුරෙහි hosting.deploy.manage අවසරය තිබිය යුතුය; එය නොමැති යතුරක් 404 ලෙස නොව 403 ලෙස ප්රතික්ෂේප කෙරේ.
මෙම අවසාන ලක්ෂ්යය සඳහා සංවිධාන හැඳුනුම්පතක් (organisation id) අවශ්ය නොවේ. ඔබගේ යතුර මඟින් එය අයත් වන සංවිධානය දැනටමත් හඳුනා ගන්නා අතර, ප්රතිචාරය ඒ වෙත සීමා වේ.
උත්සාහ කරන්න
<අගයන්> සමඟ කෝණික වරහන් තුළ ඇති ඕනෑම දෙයක් සහ ඔබේ උපකරණ පුවරුවෙන් ලබාගත් යතුරක් සමඟ key ස්ථාන දායකය ප්රතිස්ථාපනය කරන්න.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/repo/sync/run \
-H "Authorization: Bearer zdk_live_…"පද්ධතියට පිවිස සිටිනවාද? ඔබගේ උපකරණ පුවරුවේ ඇති API කොන්සෝලය මඟින් ඔබේ සැබෑ ආයතනික හැඳුනුම්පත සහ ඔබේම යතුර පුරවා, සජීවී API වෙත ඉල්ලීම ක්රියාත්මක කරන බැවින් ඔබට සැබෑ ප්රතිචාරය දැකගත හැක. මෙම අග්රලක්ෂ්යය API කොන්සෝලය තුළ විවෘත කරන්න
විස්තර
Commits whatever has changed in the site's files and pushes it to the connected branch. A 200 whose state is conflict or adopt is a successful call reporting a HELD sync — the repository moved since we last agreed with it, so nothing was pushed and nothing was overwritten on either side. Never force-pushes and never merges. Requires hosting.deploy.manage.
පරාමිතීන්
| නම | වර්ගය | අත්යවශ්යයි | එය කුමක්ද |
|---|---|---|---|
siteId (path) | Uuid | ඔව් | Site ID (UUIDv7). |
පsspil
| නම | වර්ගය | අත්යවශ්යයි | එය කුමක්ද |
|---|---|---|---|
site_id | string | ඔව් | — |
enabled | boolean | ඔව් | Whether the customer has switched two-way sync on. |
available | boolean | ඔව් | Whether it is permitted at all — true only once the customer has connected their OWN git account. False here makes enabled irrelevant; the engine will not sync either way. |
unavailable_reason | string | නැත | A sentence the customer reads when available is false. Null when it is available. |
subdir | string | නැත | Which directory of the site syncs. Empty means the whole document root. |
state | string<idle, synced, conflict, adopt, error, unsupported> | ඔව් | unsupported is TERMINAL and is not a failure either: the site is served from its repository, so there are no separate files on our side to push back. It leaves the sweep's… |
branch | string | නැත | — |
repository | string | නැත | owner/repo, or null when no repository is connected. |
conflict_commit | string | නැත | The commit in the repository that we have not seen — the one the customer needs to look at before choosing. Null unless held. |
last_sync_at | string | නැත | — |
last_sync_note | string | නැත | — |
runs | SiteRepoSyncRun[] | ඔව් | The most recent runs, newest first. Includes the no-ops. |
මෙම අවසාන ලක්ෂ්යය ආපසු ලබා දිය හැකි දෝෂ
401 · 403 · 404 · 422 · 429