Get a single blob from a record.
GET https://baq.run/api/alice/records/{entity}/{record_id}/blobs/{blob_hash}/{file_name}
A blob can only be downloaded through a record that has a Blob link to it.
Build the request URL by replacing the following variables in the record_blob endpoint URL template:
{entity} and {record_id}: Record that links to the blob.
{blob_hash}: Hash of the blob to download.
{file_name}: File name of the blob within the record. This is useful when the same blob might appear multiple times in the same record under different names and content types.
Range string optional
Part of the blob that should be returned.
Only supports single byte ranges.
The blob to download is the sole content of the response.
Content-Length int
Content-Type string
Content-Disposition: attachment; filename={file_name}
Cache-Control string
Depends on the record permissions:
Content-Range string optional
Part of the blob being returned.
Only for requests with a Range header.
We get a single hello.txt blob that was linked in one of our user’s records.
GET /api/alice/records/alice.baq.run/867deccbe7ac4adca4efc07fbe08af87/blobs/66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18/hello.txt HTTP/2
Host: baq.run
The response includes a Content-Disposition header so that browsers know how to name the file after downloading it.
HTTP/2 200 OK
Content-Length: 6
Content-Type: text/plain
Content-Disposition: attachment; filename=hello.txt
Cache-Control: max-age=6309262, s-maxage=7200, immutable
Hello\n