API reference

Block gateway

4 endpoints · Overview

GET/chunks/{hash}

Download one chunk as plaintext (get ticket)
TicketBlock gateway

Parameters · path

  • hashHashrequired
    ^[0-9a-f]{64}$

Parameters · query

  • tstringrequired
    Ticket from upload-sessions or download-tickets

Responses

  • 200
    Bytes
    string (binary)
  • 4xx/5xx
    Error
    Error
Example request
curl "https://blocks.side.example.com/chunks/9f2c4e6a8b0d2f4a6c8e0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a?t=TICKET"

PUT/chunks/{hash}

Upload one chunk (put ticket). The gateway checks BLAKE3(body) == hash; an existing chunk answers 200 without rewriting.
TicketBlock gateway

Parameters · path

  • hashHashrequired
    ^[0-9a-f]{64}$

Parameters · query

  • tstringrequired
    Ticket from upload-sessions or download-tickets

Request body application/octet-stream

Responses

  • 200
    Already stored
  • 201
    Stored
  • 4xx/5xx
    Error
    Error
Example request
curl -X PUT "https://blocks.side.example.com/chunks/9f2c4e6a8b0d2f4a6c8e0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a?t=TICKET" \
  --data-binary @A001_C003.mov

GET/files/{version_id}

Whole file as a stream, with Range support (get ticket bound to this version). Only chunks overlapping the range are read.
TicketBlock gateway

Parameters · path

  • version_idstringrequired

Parameters · query

  • tstringrequired
    Ticket from upload-sessions or download-tickets
  • downloadstring
    File name for Content-Disposition attachment

Parameters · header

  • Rangestring

Responses

  • 200
    Full body
  • 206
    Partial body
  • 4xx/5xx
    Error
    Error
Example request
curl "https://blocks.side.example.com/files/ver_01JD7Q4B6D8F0H2J4L6N8Q0S3T?t=TICKET"

POST/stream-upload

Upload a whole file; the gateway chunks and stores it and returns the manifest (put ticket)
TicketBlock gateway

Parameters · query

  • tstringrequired
    Ticket from upload-sessions or download-tickets

Request body application/octet-stream

Responses

Example request
curl -X POST "https://blocks.side.example.com/stream-upload?t=TICKET" \
  --data-binary @A001_C003.mov
Example response · 200
{
  "algo": "fastcdc-v1",
  "size": 734003200,
  "chunks": [
    {}
  ]
}