hosting

POST /v1/sites/{siteId}/repo/sync/resolve

Clear a held sync by choosing which side wins.

सबै hosting इन्डपइन्टहरू

प्रमाणीकरण

एपिआई कुञ्जीलाई बियरर टोकन (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).

अनुरोध बडी

नामप्रकारआवश्यकयो के हो
keepstring<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_idstringहुन्छ
enabledbooleanहुन्छWhether the customer has switched two-way sync on.
availablebooleanहुन्छ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_reasonstringहैनA sentence the customer reads when `available` is false. Null when it is available.
subdirstringहैनWhich directory of the site syncs. Empty means the whole document root.
statestring<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.
branchstringहैन
repositorystringहैन`owner/repo`, or null when no repository is connected.
conflict_commitstringहैन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_atstringहैन
last_sync_notestringहैन
runsSiteRepoSyncRun[]हुन्छThe most recent runs, newest first. Includes the no-ops.

यो इन्डपोइन्टले फर्काउन सक्ने त्रुटिहरू

401 · 403 · 404 · 422 · 429