hosting
GET /v1/sites/{siteId}/repo/sync
Two-way sync settings, state and recent runs for a site.
توثيقِ شناخت
ایک بیرر ٹوکن کے طور پر ایک API کی بھیجیں۔ کی کے پاس sites.view اجازت ہونی چاہیے؛ اس کے بغیر کی کو 404 کے بجائے 403 کے ساتھ مسترد کر دیا جاتا ہے۔
یہ اینڈ پوائنٹ کوئی آرگنائزیشن آئی ڈی نہیں لیتا۔ آپ کی کلید پہلے ہی اس آرگنائزیشن کی شناخت کرتی ہے جس سے یہ تعلق رکھتی ہے، اور اس کا جواب اسی کے مطابق محدود ہوتا ہے۔
آزمائیں
کوئی بھی چیز جو زاویہ دار قوسین میں ہو اسے اپنی اقدار سے بدلیں، اور کلیدی پلیس ہولڈر کو اپنے ڈیش بورڈ کی کسی کلید سے بدلیں۔
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/repo/sync \
-H "Authorization: Bearer zdk_live_…"لاگ ان ہیں؟ آپ کے ڈیش بورڈ میں موجود API کنسول آپ کی حقیقی تنظیم کی آئی ڈی اور آپ کی اپنی کلید خود بخود پُر کر دیتا ہے، اور لائیو API پر درخواست چلاتا ہے تاکہ آپ اصل ردعمل دیکھ سکیں۔ اس اینڈ پوائنٹ کو API کنسول میں کھولیں
تفصیلات
Whether this site's own files are committed back to its repository, where the sync currently stands, and the last runs. `available` is false when the customer has not connected their own account — two-way sync is free but only ever writes to a repository on an account the customer owns, so a pooled account of ours is never enough. `state` of `conflict` or `adopt` means the sync is HELD, waiting for the customer to choose; it is not an error and it will not clear itself. Requires `sites.view`.
پیرامیٹرز
| نام | قسم | لازمی | یہ کیا ہے |
|---|---|---|---|
siteId (path) | Uuid | ہاں | Site ID (UUIDv7). |
جواب
| نام | قسم | لازمی | یہ کیا ہے |
|---|---|---|---|
site_id | string | ہاں | — |
enabled | boolean | ہاں | Whether the customer has switched two-way sync on. |
available | boolean | ہاں | 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_reason | string | نہیں | A sentence the customer reads when `available` is false. Null when it is available. |
subdir | string | نہیں | Which directory of the site syncs. Empty means the whole document root. |
state | string<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. |
branch | string | نہیں | — |
repository | string | نہیں | `owner/repo`, or null when no repository is connected. |
conflict_commit | string | نہیں | 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_at | string | نہیں | — |
last_sync_note | string | نہیں | — |
runs | SiteRepoSyncRun[] | ہاں | The most recent runs, newest first. Includes the no-ops. |
وہ خرابیان جو یہ اینڈ پوائنٹ واپس کر سکتا ہے
401 · 403 · 404 · 429