Skip to content

Blobs

A blob is an opaque binary object stored on the node — an application bundle, or arbitrary app data. sdk.admin covers the full lifecycle.

Pass raw bytes (Uint8Array, ArrayBuffer, or Blob). Optionally scope the blob to a context and supply an integrity hash:

const bytes = new Uint8Array(await file.arrayBuffer());
const { blobId } = await sdk.admin.uploadBlob({
data: bytes,
hash: '…', // optional
contextId: 'ctx-id', // optional — scope to a context
});

The body is sent as application/octet-stream to PUT /admin-api/blobs.

const { blobs } = await sdk.admin.listBlobs();
// blobs: { blobId, size }[]

getBlobInfo issues a HEAD request — it reads size, hash, and MIME type from the response headers without transferring the body:

const info = await sdk.admin.getBlobInfo(blobId);
// { blobId, size, hash?, mimeType? }

getBlob returns the raw bytes as an ArrayBuffer — the endpoint streams the blob content (e.g. application/gzip), not JSON.

const buffer = await sdk.admin.getBlob(blobId); // ArrayBuffer
const view = new Uint8Array(buffer);
const { blobId: deletedId, deleted } = await sdk.admin.deleteBlob(blobId);