hosting

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

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

అన్ని hosting ఎండ్‌పాయింట్లు

ప్రమాణీకరణ

బీయర్ టోకెన్‌గా API కీని పంపండి. కీ తప్పనిసరిగా 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 కాన్సోల్ మీ అసలైన సంస్థ ID మరియు మీ స్వంత కీని నింపుతుంది, అలాగే మీరు అసలైన ప్రతిస్పందనను చూడటానికి లైవ్ 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