hosting

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

Clear a held sync by choosing which side wins.

تمام hosting اینڈ پوائنٹس

توثيقِ شناخت

ایک بیرر ٹوکن کے طور پر ایک API کی بھیجیں۔ کی کے پاس 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