hosting

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

Clear a held sync by choosing which side wins.

ਸਾਰੇ hosting ਐਂਡਪੁਆਇੰਟ

ਪ੍ਰਮਾਣੀਕਰਨ

API ਕੁੰਜੀ ਨੂੰ ਇੱਕ ਬੇਅਰਰ ਟੋਕਨ (bearer token) ਵਜੋਂ ਭੇਜੋ। ਕੁੰਜੀ ਵਿੱਚ 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 ਕੰਸੋਲ ਤੁਹਾਡੀ ਅਸਲ ਸੰਸਥਾ ਆਈਡੀ (organisation id) ਅਤੇ ਤੁਹਾਡੀ ਆਪਣੀ ਕੁੰਜੀ ਨੂੰ ਭਰਦਾ ਹੈ, ਅਤੇ ਲਾਈਵ 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