hosting
POST /v1/sites/{siteId}/repo/sync/resolve
Clear a held sync by choosing which side wins.
પ્રમાણીકરણ
એપીઆઈ કી (API key) ને બેરર ટોકન તરીકે મોકલો. કી પાસે hosting.deploy.manage પરવાનગી હોવી આવશ્યક છે; તેના વગરની કીને 404 ને બદલે 403 સાથે અસ્વીકાર કરવામાં આવશે.
આ એન્ડપૉઇન્ટ કોઈ સંસ્થા આઈડી (organisation id) લેતું નથી. તમારી કી (key) પહેલેથી જ તે જે સંસ્થા સાથે સંબંધિત છે તેની ઓળખ કરે છે, અને પ્રતિસાદ (response) તે જ પૂરતો મર્યાદિત છે.
આયમાવો
કોઈપણ કૌંસમાં રહેલી બાબતને તમારા પોતાના મૂલ્યોથી બદલો અને કી પ્લેસહોલ્ડરને તમારા ડેશબોર્ડની કીથી બદલો.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/repo/sync/resolve \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "keep": <string<site, repository>> }'साइन ઇન કરેલ છે? તમારા ડેશબોર્ડમાં આવેલું API કન્સોલ તમારી વાસ્તવિક સંસ્થાની આઈડી અને તમારી પોતાની કી ભરે છે, અને લાઇવ API સામે વિનંતી ચલાવે છે જેથી તમે વાસ્તવિક પ્રતિસાદ જોઈ શકો. આ અંતિમબિંદુને API કન્સોલમાં ખોલો
વિગતો
keep: site commits this site's files on top of the repository's current tip, so the other commits stay in the history rather than being erased. keep: repository applies the repository to the site, discarding the unsynced changes on our side — which is destructive, and is the only path that may overwrite them. There is deliberately no merge option: a platform neither party asked to arbitrate should not produce a file that neither of them wrote. Requires hosting.deploy.manage.
પેરામીટર્સ
| નામ | પ્રકાર | જરૂરી | તે શું છે |
|---|---|---|---|
siteId (path) | Uuid | હા | Site ID (UUIDv7). |
રિકવેસ્ટ બોડી
| નામ | પ્રકાર | જરૂરી | તે શું છે |
|---|---|---|---|
keep | string<site, repository> | હા | site keeps this site's files and commits them on top of the repository's current tip. repository discards the unsynced changes on our side and takes the repository's version —… |
જવાબ
| નામ | પ્રકાર | જરૂરી | તે શું છે |
|---|---|---|---|
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