ServicesScanDALHTTP APIBlobs

Complete a blob upload

POST
/blobs/uploads/complete

Join an upload's parts into its blob and return the blob, whose digest merges the parts' hashes, so no byte is read again. The blob becomes part of the Table only when a committed row references it.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Request Body

application/json
  1. body

Every part of an upload, in order from part 1.

parts*array<>
storage?|null
upload*

A multipart upload of one blob into a write attempt, at attempts/<attempt>/blobs/<objectId> under the Table's root. The client keeps it and sends it with each part and with its completion; the storage provider keeps the upload's progress, so any instance serves any step. Every part but the last holds exactly partBytes, a power of two.

Response Body

Success

application/json
  1. response

A reference to a payload that one Table owns. It is never a download URL. digest is the BLAKE3 digest of the whole payload, as lowercase hexadecimal. The payload is the object blobs/<objectId> under the Table's root, or attempts/<attempt>/blobs/<objectId> when an upload into a write attempt stored it.

attempt?|null
digest*string
mediaType*string
objectId*string
Formatuuid
size*|
tableId*string
Formatuuid
curl -X POST 'https://scandal.spiraldb.dev/blobs/uploads/complete' \  -H 'Content-Type: application/json' \  -d '{  "parts": [    {      "hash": "string",      "part": 0,      "size": "string",      "tag": "string"    }  ],  "upload": {    "attempt": "d2c50383-9b42-408a-bf30-8303c70e72c1",    "mediaType": "string",    "objectId": "e39ea5f2-2188-47f8-add0-f1976630af5e",    "partBytes": "string",    "tableId": "073fbfcb-cd05-4203-be18-a1ce6f8e4d2d",    "uploadId": "string"  }}'
{  "attempt": "d2c50383-9b42-408a-bf30-8303c70e72c1",  "digest": "string",  "mediaType": "string",  "objectId": "e39ea5f2-2188-47f8-add0-f1976630af5e",  "size": "string",  "tableId": "073fbfcb-cd05-4203-be18-a1ce6f8e4d2d"}