Skip to main content

Spec sync

Generated from apiome-rest/openapi.yaml (API version 1.204.1) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: spec-sync · 4 operations

GET /v1/tenants/{tenant_slug}/projects/{project_ref}/sync-plans/{plan_id}​

Read one merge result

One three-way merge with every conflict it found — outstanding ones first — each carrying the base, incoming and current values and the repository file and line it lives at.

Requires projects:view.

Operation id: read_plan_v1_tenants__tenant_slug__projects__project_ref__sync_plans__plan_id__get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
plan_idpathstringyesPath parameter identifying the plan id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for read one merge result.application/json SyncPlanDetail
404Not Foundapplication/json SyncErrorDetail
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/projects/{project_ref}/sync-plans/{plan_id}/conflicts/{conflict_id}​

Settle one conflict of a merge result

Records which side wins at one pointer: git takes the repository's value, draft keeps the version's.

Settling records a decision and nothing else — it does not edit the draft, take anything from the repository, or move the binding. A settlement is final; the merge moves to resolved once none are outstanding.

Requires versions:edit.

Operation id: resolve_conflict_v1_tenants__tenant_slug__projects__project_ref__sync_plans__plan_id__conflicts__conflict_id__post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
plan_idpathstringyesPath parameter identifying the plan id segment.
conflict_idpathstringyesPath parameter identifying the conflict id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for settle one conflict of a merge result.

Responses

StatusDescriptionBody
200Successful response for settle one conflict of a merge result.application/json SyncPlanDetail
404Not Foundapplication/json SyncErrorDetail
409Conflictapplication/json SyncErrorDetail
422Validation Errorapplication/json HTTPValidationError

GET /v1/tenants/{tenant_slug}/projects/{project_ref}/versions/{version_ref}/binding/sync​

Read a version's synchronization state

The most recent three-way merge of this draft against its repository ref, with its conflicts, plus the merges before it.

No provider is contacted: this is what is already known. A result whose stale flag is set was computed against a draft that has since been edited.

Requires projects:view.

Operation id: read_version_sync_v1_tenants__tenant_slug__projects__project_ref__versions__version_ref__binding_sync_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
version_refpathstringyesPath parameter identifying the version ref segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for read a version's synchronization state.application/json VersionSyncStatus
404Not Foundapplication/json SyncErrorDetail
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/projects/{project_ref}/versions/{version_ref}/binding/sync​

Merge a bound draft against its repository ref

Reads the bound selection at the commit this draft is synchronized with (the base) and at the commit its branch moved to, rebuilds the draft's own document, and merges the three.

Incoming changes that touch nothing the draft touched are recorded as applied; every overlap becomes a conflict naming its JSON Pointer, its repository file and line, and the base, incoming and current values side by side.

The draft is never modified. A merge result is a reading of three documents; what to do about it is a separate decision.

Re-running a merge of the same three documents returns the result already stored rather than computing a second answer to the same question, so a redelivered webhook or a double-click costs nothing.

Requires versions:edit, and proves the tenant's stored credential can read the repository.

Operation id: compute_plan_v1_tenants__tenant_slug__projects__project_ref__versions__version_ref__binding_sync_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_refpathstringyesPath parameter identifying the project ref segment.
version_refpathstringyesPath parameter identifying the version ref segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (optional)

Request body for merge a bound draft against its repository ref.

Responses

StatusDescriptionBody
200Successful response for merge a bound draft against its repository ref.application/json SyncPlanDetail
403Forbiddenapplication/json SyncErrorDetail
404Not Foundapplication/json SyncErrorDetail
409Conflictapplication/json SyncErrorDetail
422Unprocessable Contentapplication/json SyncErrorDetail
502Bad Gatewayapplication/json SyncErrorDetail

Schemas used​

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

SyncConflictResolve​

Settle one conflict towards one side.

Attributes: resolution: git takes the repository's value, draft keeps the version's. There is no third option: a merge result records a decision, it does not edit a document. note: Why, kept with the settled row.

PropertyTypeRequiredDescription
resolutionenum "git", "draft"yesResolution.
notestring or nullnoNote.

SyncErrorDetail​

The body of every refusal from this surface.

PropertyTypeRequiredDescription
codestringyesThe stable refusal code a client branches on.
messagestringyesA human-readable explanation.

SyncPlanCompute​

Compute a three-way merge of a bound draft against its repository ref.

PropertyTypeRequiredDescription
candidate_idstring or nullnoThe outstanding sync candidate to merge. Defaults to the binding's oldest pending candidate, which is the one a reader is looking at.
refreshbooleannoRe-read both commits even when a merge of the same three documents is already stored. The stored result is still what is returned when the inputs are unchanged, because the same inputs cannot produce a different merge.

SyncPlanDetail​

A merge result with its conflicts.

PropertyTypeRequiredDescription
planSyncPlanRecordyesPlan.
conflictsarray of SyncConflictRecordnoEvery conflict, outstanding ones first.

VersionSyncStatus​

Where one version stands with respect to merging its repository ref.

PropertyTypeRequiredDescription
version_idstringyesProject version identifier or semantic version label, depending on context.
version_labelstring or nullnoVersion Label.
boundbooleanyesWhether the version has an active binding to merge against.
latestSyncPlanDetail or nullnoThe most recent merge result, with its conflicts.
historyarray of SyncPlanRecordnoEarlier merge results, newest first.