Retrieving blobs

Blob metadata

The blob metadata might look like this:

{
    "blobId": "[id]",
    "blobPath": "/span/collections/ ... /blobs/[id]",
    "contentType": "image/png",
    "size": "2051071",
    "created": "1676970558762161756",
    "collectionId": " ... ",
    "deviceId": " ... ",
    "gatewayId": "3",
    "properties": {
        "address": "[host:port for the POST request]",
        "method": "POST",
        "path": "/some/random/path"
    }
}

The blobPath parameter points to a regular HTTP resource you can use to retrieve the blob. The client must be authenticated with an API token. If you are using cURL you can download the image with

curl -HX-API-Token:[your API token] \
    https://api.lab5e.com/span/collections/[collectionId]/blobs/[blobId] \
    --output [local file]