Finalize a write
Prepare a Table version from the files that appends wrote, writing only its metadata; the files stay where the appends put them. Deletes select stable row IDs and write deletion files through their separate attempt binding. Register the version with the Tables API and commit it to publish it. The Table binding authorizes publication.
bearerAuthAuthorizationBearer <token>application/json- body
The receipts of the appends, patches, deleted rows, column files and mirrored files a version takes. Patches, deletions and column files need an edit base, since the rows they change are the base's rows; mirrored files, and patches to a mirroring Table, need an aligned base.
base*|||||What a prepared version builds on: the Table's first version, an append that keeps the base version's rows, an overwrite that replaces them, a delete of selected rows, an edit that takes appended rows, patches, deleted rows, column files and a schema change, or a version whose files mirror the files of a version of another Table.
receipts*array<>table*A Table identity and optional explicit storage. The host resolves omitted storage as the caller.
Success
application/json- response
A prepared Table version, awaiting registration with the Tables API. sequence is its position in the Table's history.
baseVersion?|nullresourceId*stringuuidsequence*|versionId*stringuuidcurl -X POST 'https://scandal.spiraldb.dev/writes/finalize' \ -H 'Content-Type: application/json' \ -d '{ "base": { "aligned": { "source": { "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6", "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7" } }, "type": "aligned" }, "receipts": [ { "token": "string" } ], "table": { "tableId": "073fbfcb-cd05-4203-be18-a1ce6f8e4d2d" }}'{ "baseVersion": "2747589f-7a45-4c8b-b77c-fa56c48beb35", "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6", "sequence": "string", "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7"}