Binary Data (Blobs)
POST
/_api/blob/:db/:collection
Upload a blob. The collection is automatically created if it does not exist.
Request Body Options
Requires multipart/form-data with a single field named file containing the binary data.
Response
201 Created
application/json
{
"_key": "018e3ac7-8e... (auto-generated)",
"name": "image.jpg",
"type": "image/jpeg",
"size": 123456,
"chunks": 1,
"created": "2023-10-27T10:00:00Z"
}
GET
/_api/blob/:db/:collection/:key
Download a blob.
Response
200 OK
application/octet-stream
// Binary file content
DELETE
/_api/database/:db/document/:collection/:key
Delete a blob.
Uses the standard document deletion endpoint. This removes the metadata document and cleans up the associated binary data from storage.
Response
204 No Content