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.
Upload
Section titled “Upload”val bytes: ByteArray = file.readBytes()
val info = mero.admin.uploadBlob( UploadBlobRequest(data = bytes, contextId = contextId) // hash & contextId optional)val blobId = info.blobIdThe body is sent as raw application/octet-stream to PUT /admin-api/blobs.
val blobs = mero.admin.listBlobs().blobs // List<BlobInfo> — blobId, sizeInspect without downloading
Section titled “Inspect without downloading”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.mimeTypeDownload
Section titled “Download”getBlob returns the raw bytes as a ByteArray (the endpoint streams the
content, not JSON):
val data: ByteArray = mero.admin.getBlob(blobId)Delete
Section titled “Delete”val result = mero.admin.deleteBlob(blobId) // result.deleted