Upload a new blob.
POST https://baq.run/api/alice/blobs
The blob to upload is the sole content of the request.
Content-Length
int
Size of the blob in bytes.
Required to upload a blob.
hash
BlobHash
size
int
expires_at
RecordDate
In this example we upload a short text file containing the word Hello
.
POST /api/alice/blobs HTTP/2
Host: baq.run
Content-Length: 6
Content-Type: text/plain
Hello\n
The response provides us with the hash to use in a Blob link, and tells us by when we can use that blob in a record before it expires.
HTTP/2 200 OK
Content-Type: application/json
{
"hash":"66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18",
"size":6,
"expires_at":"2024-03-07T07:48:19.2320000Z"
}