hosting

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

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

সমস্ত hosting এন্ডপয়েন্ট

প্রমাণীকরণ

একটি বিয়ারার টোকেন হিসেবে একটি এপিআই কি পাঠান। কি-টির অবশ্যই hosting.deploy.manage অনুমতি থাকতে হবে; এটি ছাড়া কোনো কি ৪০৪ নয়, বরং ৪০৩ ত্রুটি দিয়ে প্রত্যাখ্যাত হবে।

এই এন্ডপয়েন্টটি কোনো অর্গানাইজেশন আইডি নেয় না। আপনার কীটি ইতিমধ্যে এটি যে অর্গানাইজেশনের অন্তর্গত তা শনাক্ত করে এবং প্রতিক্রিয়াটি সেই অনুযায়ী নির্ধারিত হয়।

চেষ্টা করুন

কোণ বন্ধনীতে থাকা যেকোনো কিছু আপনার নিজস্ব মান দিয়ে এবং কী প্লেসহোল্ডারটি আপনার ড্যাশবোর্ডের একটি কী দিয়ে প্রতিস্থাপন করুন।

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> }'

লগ ইন করা আছে? আপনার ড্যাশবোর্ডের এপিআই কনসোল আপনার আসল অর্গানাইজেশন আইডি এবং আপনার নিজের কি পূরণ করে দেয়, এবং লাইভ এপিআই-এর বিপরীতে অনুরোধটি চালায় যাতে আপনি প্রকৃত প্রতিক্রিয়া দেখতে পান। এই এন্ডপয়েন্টটি এপিআই কনসোলে খুলুন

বিবরণ

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