Skip to content

Blobs

A blob is an opaque binary object stored on the node — an application bundle or arbitrary app data. mero.admin covers the full lifecycle; blob bytes are a plain ByteArray.

val bytes: ByteArray = file.readBytes()
val info = mero.admin.uploadBlob(
UploadBlobRequest(data = bytes, contextId = contextId) // hash & contextId optional
)
val blobId = info.blobId

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

val blobs = mero.admin.listBlobs().blobs // List<BlobInfo> — blobId, size

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

val meta = mero.admin.getBlobInfo(blobId)
// meta.blobId, meta.size, meta.hash, meta.mimeType

getBlob returns the raw bytes as a ByteArray (the endpoint streams the content, not JSON):

val data: ByteArray = mero.admin.getBlob(blobId)
val result = mero.admin.deleteBlob(blobId) // result.deleted