openapi: 3.1.0
info:
title: Lix Server Protocol
version: "1"
description: Canonical HTTP surface implemented by lix::server_protocol.
servers:
- url: https://host.example
security:
- bearerAuth: []
- cookieAuth: []
- {}
paths:
/lix/v1/{lix_id}:
parameters:
- $ref: "#/components/parameters/LixId"
get:
operationId: handshake
parameters:
- $ref: "#/components/parameters/SessionId"
- name: activeBranchId
in: query
schema: { type: string, minLength: 1 }
description: Allowed only while creating a session.
responses:
"200":
description: Session created or resumed.
headers:
Cache-Control: { schema: { type: string, const: no-store } }
content:
application/json:
schema: { $ref: "#/components/schemas/Handshake" }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/session:
parameters:
- $ref: "#/components/parameters/LixId"
delete:
operationId: deleteSession
parameters: [{ $ref: "#/components/parameters/RequiredSessionId" }]
responses:
"204": { description: Session deleted. }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/execute:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: execute
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/IdempotencyKey"
requestBody:
required: true
content:
application/json: { schema: { $ref: "#/components/schemas/ExecuteRequest" } }
responses:
"200": { $ref: "#/components/responses/Execute" }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/execute-batch:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: executeBatch
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/IdempotencyKey"
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [statements]
properties:
statements:
type: array
items: { $ref: "#/components/schemas/ExecuteBatchStatement" }
options: { $ref: "#/components/schemas/ExecuteOptions" }
cacheBlobs: { type: boolean }
responses:
"200":
description: Ordered statement results.
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/ExecuteResponse" }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/sync/push:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: syncPush
description: Atomically stores at most 512 total immutable commits plus compare-and-swap branch-ref updates. Commit identity makes retries idempotent; oversized batches must be split on dependency-complete boundaries.
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/SyncProtocolVersion"
requestBody:
required: true
content:
application/json: { schema: { $ref: "#/components/schemas/SyncPushRequest" } }
responses:
"200":
description: The commit and branch advancement are durable.
content: { application/json: { schema: { $ref: "#/components/schemas/SyncPushResponse" } } }
"409":
description: The branch no longer has the expected head, or an immutable identity names different content.
content: { application/json: { schema: { $ref: "#/components/schemas/ErrorEnvelope" } } }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/sync/pull:
parameters:
- $ref: "#/components/parameters/LixId"
get:
operationId: syncPull
description: Returns a hot-state snapshot when after is omitted. Otherwise long-polls complete repository commit/ref events after a repository cursor.
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/SyncProtocolVersion"
- name: after
in: query
schema: { type: integer, minimum: 0 }
- name: limit
in: query
schema: { type: integer, minimum: 1, maximum: 512, default: 128 }
- name: snapshotBranchId
in: query
schema: { type: string, minLength: 1 }
description: With snapshotHeadCommitId, requests a stateless hot-row page pinned to this branch.
- name: snapshotHeadCommitId
in: query
schema: { type: string, minLength: 1 }
description: Immutable branch head used to serve a stable snapshot row page.
- name: snapshotAfter
in: query
schema: { type: string, minLength: 1, maxLength: 4096 }
description: Opaque continuation returned by the preceding row page.
responses:
"200":
description: Pinned hot metadata, one immutable row page, or the next ordered repository event page.
content:
application/json:
schema:
oneOf:
- { $ref: "#/components/schemas/SyncPullResponse" }
- { $ref: "#/components/schemas/SyncSnapshotRowPage" }
"413":
description: The encoded response exceeds the 64 MiB protocol limit.
content: { application/json: { schema: { $ref: "#/components/schemas/ErrorEnvelope" } } }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/sync/history:
parameters:
- $ref: "#/components/parameters/LixId"
get:
operationId: syncHistory
description: Fetches one bounded first-parent history page without changing live sync state.
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/SyncProtocolVersion"
- name: head
in: query
required: true
schema: { type: string, minLength: 1, maxLength: 255 }
- name: limit
in: query
required: true
schema: { type: integer, minimum: 1, maximum: 100 }
responses:
"200":
description: Oldest-to-newest commits plus a complete-state fence when the first parent lies outside the page.
content: { application/json: { schema: { $ref: "#/components/schemas/SyncHistoryResponse" } } }
"413":
description: The encoded response exceeds the 64 MiB protocol limit.
content: { application/json: { schema: { $ref: "#/components/schemas/ErrorEnvelope" } } }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/sync/blob:
parameters:
- $ref: "#/components/parameters/LixId"
get:
operationId: syncGetBlobs
description: Loads up to 16 canonical FastCDC manifests by their BLAKE3-derived blob identities.
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/SyncProtocolVersion"
- $ref: "#/components/parameters/BlobIds"
responses:
"200":
description: Canonical flat manifests in the requested order.
content:
application/json:
schema:
type: array
minItems: 1
maxItems: 16
items: { $ref: "#/components/schemas/SyncBlobManifest" }
"404": { $ref: "#/components/responses/Error" }
default: { $ref: "#/components/responses/Error" }
post:
operationId: syncRegisterBlob
description: Reports missing chunks, or atomically registers a complete verified manifest.
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/SyncProtocolVersion"
requestBody:
required: true
content:
application/json: { schema: { $ref: "#/components/schemas/SyncBlobManifest" } }
responses:
"200":
description: Missing chunks to upload, or confirmation that the blob is complete.
content: { application/json: { schema: { $ref: "#/components/schemas/SyncBlobRegistration" } } }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/sync/chunk:
parameters:
- $ref: "#/components/parameters/LixId"
get:
operationId: syncGetChunk
description: Loads one authenticated raw BLAKE3-addressed chunk.
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/SyncProtocolVersion"
- $ref: "#/components/parameters/ChunkId"
responses:
"200":
description: Exact raw chunk bytes.
headers:
Cache-Control: { schema: { type: string } }
content:
application/octet-stream:
schema: { type: string, contentEncoding: binary, minLength: 1, maxLength: 4194304 }
"404": { $ref: "#/components/responses/Error" }
default: { $ref: "#/components/responses/Error" }
put:
operationId: syncPutChunk
description: Stores raw bytes only when their BLAKE3 digest equals chunkId.
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/SyncProtocolVersion"
- $ref: "#/components/parameters/ChunkId"
requestBody:
required: true
content:
application/octet-stream:
schema: { type: string, contentEncoding: binary, minLength: 1, maxLength: 4194304 }
responses:
"204": { description: Chunk is durably present. }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/transaction/begin:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: beginTransaction
parameters: [{ $ref: "#/components/parameters/RequiredSessionId" }]
responses:
"200":
description: Transaction capability.
content:
application/json:
schema:
type: object
required: [transactionId]
properties: { transactionId: { type: string } }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/transaction/execute:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: transactionExecute
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/TransactionId"
requestBody:
required: true
content:
application/json: { schema: { $ref: "#/components/schemas/ExecuteRequest" } }
responses:
"200": { $ref: "#/components/responses/Execute" }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/transaction/commit:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: commitTransaction
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/TransactionId"
responses:
"204": { description: Transaction committed. }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/transaction/rollback:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: rollbackTransaction
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/TransactionId"
responses:
"204": { description: Transaction rolled back. }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/file:
parameters:
- $ref: "#/components/parameters/LixId"
get:
operationId: readFile
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/FilePath"
- name: Range
in: header
schema: { type: string, pattern: "^bytes=[0-9]+-[0-9]*$" }
responses:
"200": { $ref: "#/components/responses/File" }
"206": { $ref: "#/components/responses/File" }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/file/upsert:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: upsertFile
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/FilePath"
- $ref: "#/components/parameters/IdempotencyKey"
- name: Lix-Upload-Id
in: header
schema: { type: string }
- name: Content-Range
in: header
schema: { type: string }
requestBody:
required: true
content:
application/octet-stream: { schema: { type: string, contentEncoding: binary } }
responses:
"200": { $ref: "#/components/responses/Execute" }
"308": { description: Resumable upload part accepted. }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/file/upsert-batch:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: upsertFileBatch
parameters:
- $ref: "#/components/parameters/RequiredSessionId"
- $ref: "#/components/parameters/IdempotencyKey"
requestBody:
required: true
content:
application/octet-stream:
schema: { type: string, contentEncoding: binary }
responses:
"200": { $ref: "#/components/responses/Execute" }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/branch/create:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: createBranch
parameters: [{ $ref: "#/components/parameters/RequiredSessionId" }]
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [name]
properties:
id: { type: string }
name: { type: string, minLength: 1 }
fromCommitId: { type: string }
responses:
"200": { description: Branch created. }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/undo:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: undo
parameters: [{ $ref: "#/components/parameters/RequiredSessionId" }]
responses:
"200": { description: Undo committed. }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/redo:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: redo
parameters: [{ $ref: "#/components/parameters/RequiredSessionId" }]
responses:
"200": { description: Redo committed. }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/branch/switch:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: switchBranch
parameters: [{ $ref: "#/components/parameters/RequiredSessionId" }]
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [branchId]
properties: { branchId: { type: string, minLength: 1 } }
responses:
"200": { description: Session switched. }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/observe:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: observe
parameters: [{ $ref: "#/components/parameters/RequiredSessionId" }]
requestBody:
required: true
content:
application/json: { schema: { $ref: "#/components/schemas/ExecuteRequest" } }
responses:
"200": { $ref: "#/components/responses/EventStream" }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/observe/multiplex:
parameters:
- $ref: "#/components/parameters/LixId"
post:
operationId: observeMultiplex
parameters: [{ $ref: "#/components/parameters/RequiredSessionId" }]
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [subscriptions]
properties:
subscriptions:
type: array
minItems: 1
maxItems: 32
items:
allOf:
- $ref: "#/components/schemas/ExecuteRequest"
- type: object
required: [id]
properties: { id: { type: string } }
responses:
"200": { $ref: "#/components/responses/EventStream" }
default: { $ref: "#/components/responses/Error" }
/lix/v1/{lix_id}/snapshot:
parameters:
- $ref: "#/components/parameters/LixId"
get:
operationId: exportSnapshot
description: Streams a deterministic complete point-in-time copy of the Lix.
security:
- bearerAuth: []
- cookieAuth: []
responses:
"200":
description: Canonical Lix snapshot stream.
headers:
Cache-Control:
schema: { type: string, const: "no-store, no-transform" }
content:
application/vnd.lix.snapshot:
schema: { type: string, format: binary }
default: { $ref: "#/components/responses/Error" }
components:
securitySchemes:
bearerAuth: { type: http, scheme: bearer }
cookieAuth: { type: apiKey, in: cookie, name: session }
parameters:
LixId:
name: lix_id
in: path
required: true
description: Immutable canonical Lix UUID.
schema:
type: string
format: uuid
pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
SessionId:
name: Lix-Session-Id
in: header
required: false
schema: { type: string }
RequiredSessionId:
name: Lix-Session-Id
in: header
required: true
schema: { type: string }
SyncProtocolVersion:
name: lix-sync-protocol-version
in: header
required: true
description: Exact sync wire-protocol version advertised by the handshake.
schema: { type: integer, const: 6 }
TransactionId:
name: Lix-Transaction-Id
in: header
required: true
schema: { type: string }
IdempotencyKey:
name: Idempotency-Key
in: header
required: false
schema: { type: string, minLength: 1, maxLength: 255 }
RequiredIdempotencyKey:
name: Idempotency-Key
in: header
required: true
schema: { type: string, minLength: 1, maxLength: 255 }
FilePath:
name: path
in: query
required: true
schema: { type: string, minLength: 1 }
BlobIds:
name: blobIds
in: query
required: true
description: One through 16 distinct lowercase BLAKE3 identities separated by commas.
schema: { type: string, pattern: "^[0-9a-f]{64}(,[0-9a-f]{64}){0,15}$" }
ChunkId:
name: chunkId
in: query
required: true
schema: { type: string, pattern: "^[0-9a-f]{64}$" }
responses:
Execute:
description: SQL result.
content:
application/json: { schema: { $ref: "#/components/schemas/ExecuteResponse" } }
File:
description: Raw file contents. Lix-File-Found distinguishes missing and empty files.
headers:
Lix-File-Found: { schema: { type: string, enum: ["true", "false"] } }
Accept-Ranges: { schema: { type: string, const: bytes } }
content:
application/octet-stream: { schema: { type: string, contentEncoding: binary } }
EventStream:
description: Server-sent `next` and `error` events.
content:
text/event-stream: { schema: { type: string } }
Error:
description: Canonical protocol error.
content:
application/json: { schema: { $ref: "#/components/schemas/ErrorEnvelope" } }
schemas:
Handshake:
type: object
required: [protocolVersion, syncProtocolVersion, activeBranchId, activeAccountId, sessionId, capabilities]
properties:
protocolVersion: { type: integer, const: 6 }
syncProtocolVersion: { type: integer, const: 6 }
activeBranchId: { type: string }
activeAccountId: { type: string }
sessionId: { type: string }
capabilities:
type: object
required: [binaryFileUpsert, binaryFileUpsertBatch, binaryFileRead, syncPush, syncPull, syncHistory, syncBlob, syncChunk]
properties:
binaryFileUpsert: { type: boolean }
binaryFileUpsertBatch: { type: boolean }
binaryFileRead: { type: boolean }
syncPush: { type: boolean }
syncPull: { type: boolean }
syncHistory: { type: boolean }
syncBlob: { type: boolean }
syncChunk: { type: boolean }
ExecuteOptions:
type: object
properties: { originKey: { type: string } }
ExecuteRequest:
type: object
required: [sql]
properties:
sql: { type: string, minLength: 1 }
params: { type: array, items: {} }
options: { $ref: "#/components/schemas/ExecuteOptions" }
cacheBlobs: { type: boolean }
ExecuteBatchStatement:
type: object
required: [sql]
properties:
sql: { type: string, minLength: 1 }
params: { type: array, items: {} }
label: { type: string }
ExecuteResponse:
type: object
required: [columns, rows, rowsAffected, notices]
properties:
columns: { type: array, items: { type: string } }
rows: { type: array, items: { type: array, items: {} } }
rowsAffected: { type: integer, minimum: 0 }
notices: { type: array, items: { type: object } }
SyncRowPkPart:
oneOf:
- type: object
additionalProperties: false
required: [type, value]
properties:
type: { const: uuid }
value: { type: string, format: uuid }
- type: object
additionalProperties: false
required: [type, value]
properties:
type: { const: integer }
value: { type: integer }
- type: object
additionalProperties: false
required: [type, value]
properties:
type: { const: string }
value: { type: string }
- type: object
additionalProperties: false
required: [type, value]
properties:
type: { const: bytes }
value: { type: string, contentEncoding: base64 }
SyncRowPk:
type: array
minItems: 1
items: { $ref: "#/components/schemas/SyncRowPkPart" }
description: Sync-only physical row identity components in declared primary-key order; this is not the public SQL/SDK lix_row_ref.
SyncCommitMember:
type: object
required: [changeId, authored, schemaKey, rowPk, deleted, rowCreatedAt, rowUpdatedAt, changeAccountId, changeCreatedAt]
properties:
changeId: { type: string, minLength: 1 }
authored: { type: boolean }
schemaKey: { type: string, minLength: 1, maxLength: 255 }
fileId: { type: [string, "null"], maxLength: 255 }
rowPk: { $ref: "#/components/schemas/SyncRowPk" }
deleted: { type: boolean }
snapshot: {}
metadata: {}
rowCreatedAt: { type: string, minLength: 1 }
rowUpdatedAt: { type: string, minLength: 1 }
changeAccountId: { type: string, minLength: 1 }
changeCreatedAt: { type: string, minLength: 1 }
originKey: { type: [string, "null"] }
SyncCommit:
type: object
required: [commitId, parentCommitIds, accountId, createdAt, selectedSourceCommitId, members]
properties:
commitId: { type: string, minLength: 1 }
parentCommitIds: { type: array, items: { type: string, minLength: 1 } }
accountId: { type: string, minLength: 1 }
createdAt: { type: string, minLength: 1 }
selectedSourceCommitId:
type: [string, "null"]
description: Exactly parentCommitIds[1] for a merge with selected members; null otherwise.
stateAlias:
oneOf:
- { $ref: "#/components/schemas/SyncCommitStateAlias" }
- { type: "null" }
description: Authenticated complete-state source for a metadata-only checkpoint commit; omitted or null for ordinary and merge commits.
members: { type: array, items: { $ref: "#/components/schemas/SyncCommitMember" } }
SyncCommitStateAlias:
type: object
additionalProperties: false
required: [sourceCommitId, stateRootId]
properties:
sourceCommitId: { type: string, minLength: 1 }
stateRootId: { type: string, pattern: "^[0-9a-f]{64}$" }
SyncRefUpdate:
type: object
required: [branchId, expectedHeadCommitId, expectedCheckpointCommitId, headCommitId, checkpointCommitId]
properties:
branchId: { type: string, minLength: 1 }
expectedHeadCommitId: { type: [string, "null"] }
expectedCheckpointCommitId: { type: [string, "null"] }
headCommitId: { type: [string, "null"] }
checkpointCommitId:
type: [string, "null"]
description: Branch working-diff checkpoint at headCommitId. Required and non-null for a headed update; null only when deleting the branch.
SyncPushRequest:
type: object
required: [commits, refUpdates, inlineBlobs]
properties:
commits: { type: array, maxItems: 512, items: { $ref: "#/components/schemas/SyncCommit" } }
refUpdates: { type: array, maxItems: 512, items: { $ref: "#/components/schemas/SyncRefUpdate" } }
inlineBlobs:
type: array
description: Self-contained small blobs referenced by commits. Larger blobs use the manifest and chunk endpoints.
items: { $ref: "#/components/schemas/SyncBlobManifest" }
SyncPushResponse:
type: object
required: [cursor]
properties:
cursor: { type: integer, minimum: 0 }
SyncCommitHeader:
type: object
required: [commitId, parentCommitIds, accountId, createdAt, generation, firstParentJumpCommitId, firstParentJumpSpan]
properties:
commitId: { type: string }
parentCommitIds: { type: array, items: { type: string } }
accountId: { type: string }
createdAt: { type: string }
generation: { type: integer, minimum: 0 }
firstParentJumpCommitId: { type: [string, "null"] }
firstParentJumpSpan: { type: [integer, "null"], minimum: 1 }
SyncSnapshotRow:
type: object
required: [branchId, schemaKey, rowPk, changeId, commitId, createdAt, updatedAt, changeAccountId, changeCreatedAt]
properties:
branchId: { type: string }
schemaKey: { type: string }
fileId: { type: [string, "null"] }
rowPk: { $ref: "#/components/schemas/SyncRowPk" }
snapshot: {}
metadata: {}
changeId: { type: string }
commitId: { type: string }
createdAt: { type: string }
updatedAt: { type: string }
changeAccountId: { type: string, minLength: 1 }
changeCreatedAt: { type: string, minLength: 1 }
originKey: { type: [string, "null"] }
SyncBranchHead:
type: object
required: [branchId, headCommitId, checkpointCommitId, checkpointStateRootId, hotStateRootId]
properties:
branchId: { type: string }
headCommitId: { type: [string, "null"] }
checkpointCommitId:
type: [string, "null"]
description: Branch working-diff checkpoint whose baseline is installed with this snapshot. Non-null exactly when headCommitId is non-null.
checkpointStateRootId:
type: string
pattern: "^[0-9a-f]{64}$"
description: BLAKE3 root of the live tombstone-filtered snapshot rows at checkpointCommitId.
hotStateRootId:
type: string
pattern: "^[0-9a-f]{64}$"
description: BLAKE3 root of the live tombstone-filtered snapshot rows at this immutable head.
SyncSnapshotRowPage:
type: object
required: [branchId, headCommitId, rows, continuation]
properties:
branchId: { type: string, minLength: 1 }
headCommitId: { type: string, minLength: 1 }
rows: { type: array, maxItems: 512, items: { $ref: "#/components/schemas/SyncSnapshotRow" } }
continuation: { type: [string, "null"], maxLength: 4096 }
SyncEvent:
type: object
required: [cursor, commits, refUpdates, inlineBlobs]
properties:
cursor: { type: integer, minimum: 1 }
commits: { type: array, maxItems: 512, items: { $ref: "#/components/schemas/SyncCommit" } }
refUpdates: { type: array, maxItems: 512, items: { $ref: "#/components/schemas/SyncRefUpdate" } }
inlineBlobs:
type: array
items: { $ref: "#/components/schemas/SyncBlobManifest" }
SyncPullResponse:
oneOf:
- type: object
required: [kind, cursor, lixId, defaultBranchId, branches]
properties:
kind: { type: string, const: snapshot }
cursor: { type: integer, minimum: 0 }
lixId: { type: string, minLength: 1 }
defaultBranchId: { type: string, minLength: 1 }
branches: { type: array, items: { $ref: "#/components/schemas/SyncBranchHead" } }
- type: object
required: [kind, cursor, events]
properties:
kind: { type: string, const: delta }
cursor: { type: integer, minimum: 0 }
events: { type: array, maxItems: 512, items: { $ref: "#/components/schemas/SyncEvent" } }
SyncHistoryResponse:
type: object
required: [commits, commitHeaders, boundaries]
properties:
commits: { type: array, maxItems: 100, items: { $ref: "#/components/schemas/SyncCommit" } }
commitHeaders: { type: array, items: { $ref: "#/components/schemas/SyncCommitHeader" } }
boundaries: { type: array, maxItems: 100, items: { $ref: "#/components/schemas/SyncHistoryBoundary" } }
SyncHistoryBoundary:
type: object
required: [commitId, liveStateRootId]
properties:
commitId: { type: string, minLength: 1 }
liveStateRootId: { type: string, pattern: "^[0-9a-f]{64}$" }
SyncBlobChunk:
type: object
required: [chunkId, sizeBytes]
properties:
chunkId: { type: string, pattern: "^[0-9a-f]{64}$" }
sizeBytes: { type: integer, minimum: 1, maximum: 4194304 }
SyncBlobManifest:
type: object
required: [blobId, sizeBytes, chunks]
properties:
blobId: { type: string, pattern: "^[0-9a-f]{64}$" }
sizeBytes: { type: integer, minimum: 0 }
chunks:
type: array
maxItems: 16384
items: { $ref: "#/components/schemas/SyncBlobChunk" }
inlineBytesBase64:
type: string
maxLength: 87384
SyncBlobRegistration:
type: object
required: [missingChunkIds, complete]
properties:
missingChunkIds:
type: array
maxItems: 16384
items: { type: string, pattern: "^[0-9a-f]{64}$" }
complete: { type: boolean }
ErrorEnvelope:
type: object
required: [error]
properties:
error:
type: object
required: [code, message]
properties:
code: { type: string }
message: { type: string }
hint: { type: string }
details: {}