hosting

PUT /v1/sites/{siteId}/repo/sync

Turn two-way sync on or off for a site.

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

प्रमाणीकरण

एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। कुञ्जीसँग hosting.deploy.manage अनुमति हुनुपर्छ; अनुमति नभएको कुञ्जीलाई 404 होइन, 403 मार्फत अस्वीकार गरिन्छ।

यो इन्डपोइन्टले कुनै संस्थाको आइडी लिँदैन। तपाईंको कुञ्जीले यस अन्तर्गत पर्ने संस्थालाई पहिल्यै पहिचान गर्छ, र प्रतिक्रिया त्यसैमा सीमित हुन्छ।

प्रयास गर्नुहोस्

कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/repo/sync \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": <boolean> }'

लगइन गर्नुभएको छ? तपाईंको ड्यासबोर्डमा रहेको API कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ API विरुद्ध अनुरोध चलाउँछ ताकि तपाईंले वास्तविक प्रतिक्रिया हेर्न सक्नुहोस्। यो एन्डपोइन्टलाई API कन्सोलमा खोल्नुहोस्

विवरणहरू

Free, and refused with 422 unless the customer has connected their own GitHub account. Turning it on does not push anything by itself — the first run is either the scheduled sweep or an explicit run. Requires `hosting.deploy.manage`.

प्यारामिटरहरू

नामप्रकारआवश्यकयो के हो
siteId (path)Uuidहुन्छSite ID (UUIDv7).

अनुरोध बडी

नामप्रकारआवश्यकयो के हो
enabledbooleanहुन्छ
subdirstringहैनRestrict the sync to one directory of the site. Empty syncs the whole document root, which for a WordPress site is usually not what the customer wants.

प्रतिक्रिया

नामप्रकारआवश्यकयो के हो
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