hosting
POST /v1/sites/{siteId}/repo/sync/resolve
Clear a held sync by choosing which side wins.
प्रमाणीकरण
एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। कुञ्जीसँग hosting.deploy.manage अनुमति हुनुपर्छ; अनुमति नभएको कुञ्जीलाई 404 होइन, 403 मार्फत अस्वीकार गरिन्छ।
यो इन्डपोइन्टले कुनै संस्थाको आइडी लिँदैन। तपाईंको कुञ्जीले यस अन्तर्गत पर्ने संस्थालाई पहिल्यै पहिचान गर्छ, र प्रतिक्रिया त्यसैमा सीमित हुन्छ।
प्रयास गर्नुहोस्
कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।
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> | हुन्छ | `conflict` and `adopt` are HELD, not failed — the sync stopped on purpose and is waiting for the customer to choose a side. |
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