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.

GET /v1/object/{module_id}/{key}

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

Path and Query Parameters

ParameterInTypeRequiredDescription
module_idpathstringYesModule ID identifying the bucket
keypathstringYesObject key/path to download
Terminal window
# Download a file from a bucket
npx raindrop object get my-key -b my-bucket
# Download to specific output file
npx raindrop object get my-key output.txt -b my-bucket
# Output to stdout
npx raindrop object get my-key -b my-bucket --format stdout

POST /v1/object/{module_id}/{key}

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

Path and Query Parameters

ParameterInTypeRequiredDescription
module_idpathstringYesModule ID identifying the bucket
keypathstringYesObject key/path in the bucket

Request Body

Body

module_id (string)

Details
Description

Module ID identifying the bucket

Example
01jtgtrd37acrqf7k24dggg31s

content (string) Required

Details
Description

Binary content of the object

content_type (string)

Details
Description

MIME type of the object

Example
application/pdf
Terminal window
# Upload a file to a bucket
npx raindrop object put ./myfile.txt my-key -b my-bucket
# Upload with specific content type
npx raindrop object put ./myfile.json my-key -b my-bucket --content-type application/json

Response Examples

{
"bucket": {
"module_id": "01jt3vs2nyt2xwk2f54x2bkn84",
"bucket_name": "mr-bucket",
"application_version_id": "01jt3vs1qggsy39eeyq4k295q1",
"application_name": "demo-smartbucket"
},
"key": "test-object.txt"
}

DELETE /v1/object/{module_id}/{key}

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

Path and Query Parameters

ParameterInTypeRequiredDescription
module_idpathstringYesModule ID identifying the bucket
keypathstringYesObject key/path to delete

GET /v1/object/{module_id}

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

Path and Query Parameters

ParameterInTypeRequiredDescription
module_idpathstringYesModule ID identifying the bucket
Terminal window
# List all objects in a bucket
npx raindrop object list -b my-bucket
# List objects in JSON format
npx raindrop object list -b my-bucket --output json
# List objects in table format
npx raindrop object list -b my-bucket --output table

Response Examples

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