Skip to content

Object Storage

The object storage endpoints handle operations on objects stored in buckets, providing core functionality for managing files and data in SmartBuckets. This service enables direct interaction with stored objects through simple CRUD operations.

POST /v1/put_object

Upload a file to a SmartBucket or regular bucket. The bucket parameter (ID) is used to identify the bucket to upload to. The key is the path to the object in the bucket.

Schema Reference

Request Body

key (string) Required

Details
Description

Object key/path in the bucket

Example
my-key

content (string) Required

Details
Description

Binary content of the object

contentType (string) Required

Details
Description

MIME type of the object

Example
application/pdf

bucketLocation (object) Required

Details
Description

The buckets to search. If provided, the search will only return results from these buckets

Example
{
"bucket": {
"name": "my-smartbucket",
"version": "01jxanr45haeswhay4n0q8340y",
"application_name": "my-app"
}
}
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const response = await client.bucket.put({
bucketLocation: { bucket: { name: 'my-smartbucket' } },
content: 'U3RhaW5sZXNzIHJvY2tz',
contentType: 'application/pdf',
key: 'my-key',
});
console.log(response.bucket);

Response Examples

{
"bucket": {
"moduleId": "01jt3vs2nyt2xwk2f54x2bkn84"
},
"key": "test-object.txt"
}

POST /v1/get_object

Download a file from a SmartBucket or regular bucket. The bucket parameter (ID) is used to identify the bucket to download from. The key is the path to the object in the bucket.

Schema Reference

Request Body

key (string) Required

Details
Description

Object key/path to download

Example
my-key

bucketLocation (object) Required

Details
Description

The buckets to search. If provided, the search will only return results from these buckets

Example
{
"bucket": {
"name": "my-smartbucket",
"version": "01jxanr45haeswhay4n0q8340y",
"application_name": "my-app"
}
}
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const bucket = await client.bucket.get({
bucketLocation: { bucket: { name: 'my-smartbucket' } },
key: 'my-key',
});
console.log(bucket.content);

Response Examples

{
"content": "example",
"contentType": "example"
}

POST /v1/delete_object

Delete a file from a SmartBucket or regular bucket. The bucket parameter (ID) is used to identify the bucket to delete from. The key is the path to the object in the bucket.

Schema Reference

Request Body

key (string) Required

Details
Description

Object key/path to delete

Example
my-key

bucketLocation (object) Required

Details
Description

The buckets to search. If provided, the search will only return results from these buckets

Example
{
"bucket": {
"name": "my-smartbucket",
"version": "01jxanr45haeswhay4n0q8340y",
"application_name": "my-app"
}
}
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const bucket = await client.bucket.delete({
bucketLocation: { bucket: { name: 'my-smartbucket' } },
key: 'my-key',
});
console.log(bucket);

Response Examples

{}

POST /v1/list_objects

List all objects in a SmartBucket or regular bucket. The bucket parameter (ID) is used to identify the bucket to list objects from.

Schema Reference

Request Body

bucketLocation (object) Required

Details
Description

The buckets to search. If provided, the search will only return results from these buckets

Example
{
"bucket": {
"name": "my-smartbucket",
"version": "01jxanr45haeswhay4n0q8340y",
"application_name": "my-app"
}
}
import Raindrop from '@liquidmetal-ai/lm-raindrop';
const client = new Raindrop();
const buckets = await client.bucket.list({ bucketLocation: { bucket: { name: 'my-smartbucket' } } });
console.log(buckets.objects);

Response Examples

{
"objects": [
{
"key": "08036c5a50a93da84c5c45ba468c58159d75281e.pdf",
"size": "401107",
"contentType": "application/pdf",
"lastModified": "2025-05-05T18:36:43.029Z"
},
{
"key": "0a29925ccc5e6299e132a73325956a3abef6dd26.pdf",
"size": "57173",
"contentType": "application/pdf",
"lastModified": "2025-05-05T18:36:43.985Z"
},
{
"key": "0e21835a42a6df2405496f62647058ff855743c1.pdf",
"size": "1223197",
"contentType": "application/pdf",
"lastModified": "2025-05-05T18:36:45.362Z"
}
]
}