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
Parameter | In | Type | Required | Description |
---|---|---|---|---|
module_id | path | string | Yes | Module ID identifying the bucket |
key | path | string | Yes | Object key/path to download |
content
(string
)
Details
Description
No specific comments in original for these fields directly, but they were part of the original GetObjectResponse.
content_type
(string
)
Details
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
# Download a file from a bucketnpx raindrop object get my-key -b my-bucket
# Download to specific output filenpx raindrop object get my-key output.txt -b my-bucket
# Output to stdoutnpx raindrop object get my-key -b my-bucket --format stdout
# Download a file from a bucket (the API only supports module IDs)curl -X GET https://api.raindrop.run/v1/object/01jtgtrd37acrqf7k24dggg31s/my-key \ -H "Authorization: Bearer lm_apikey_..." \ --output myfile.txt
# Output to stdout (the API only supports module IDs)curl -X GET https://api.raindrop.run/v1/object/01jtgtrd37acrqf7k24dggg31s/my-key \ -H "Authorization: Bearer lm_apikey_..."
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
Parameter | In | Type | Required | Description |
---|---|---|---|---|
module_id | path | string | Yes | Module ID identifying the bucket |
key | path | string | Yes | Object 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
bucket
(object
)
Details
Description
Information about the bucket where the object was uploaded
Example
{ "module_id": "01jt3vs2nyt2xwk2f54x2bkn84", "bucket_name": "mr-bucket", "application_version_id": "01jt3vs1qggsy39eeyq4k295q1", "application_name": "demo-smartbucket"}
key
(string
)
Details
Description
Key/path of the uploaded object
Example
test-object.txt
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
# Upload a file to a bucketnpx raindrop object put ./myfile.txt my-key -b my-bucket
# Upload with specific content typenpx raindrop object put ./myfile.json my-key -b my-bucket --content-type application/json
# Upload a file to a bucket (the API only supports module IDs)curl -X PUT https://api.raindrop.run/v1/object/01jtgtrd37acrqf7k24dggg31s/my-key \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: text/plain" \ --data-binary @myfile.txt
# Upload with specific content type (the API only supports module IDs)curl -X PUT https://api.raindrop.run/v1/object/01jtgtrd37acrqf7k24dggg31s/my-key \ -H "Authorization: Bearer lm_apikey_..." \ -H "Content-Type: application/json" \ --data-binary @myfile.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
Parameter | In | Type | Required | Description |
---|---|---|---|---|
module_id | path | string | Yes | Module ID identifying the bucket |
key | path | string | Yes | Object key/path to delete |
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
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
Parameter | In | Type | Required | Description |
---|---|---|---|---|
module_id | path | string | Yes | Module ID identifying the bucket |
objects
(array
)
Details
Description
List of objects in the bucket with their metadata
Example
[ { "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" }]
code
(string
)
Details
Description
Status codes and their meanings:
Code | Number | Description |
---|---|---|
OK | 0 | No error occurred. |
CANCELLED | 1 | The operation was cancelled, typically by the caller. |
UNKNOWN | 2 | Unknown error. Usually means a server error not mapped to a known code. |
INVALID_ARGUMENT | 3 | Client specified an invalid argument. |
DEADLINE_EXCEEDED | 4 | Deadline expired before operation could complete. |
NOT_FOUND | 5 | Requested entity was not found. |
ALREADY_EXISTS | 6 | Entity that a client attempted to create already exists. |
PERMISSION_DENIED | 7 | Caller doesn’t have permission. |
RESOURCE_EXHAUSTED | 8 | Some resource has been exhausted (e.g., quota, memory). |
FAILED_PRECONDITION | 9 | Operation rejected because system not in required state. |
ABORTED | 10 | Operation aborted, usually due to concurrency issues. |
OUT_OF_RANGE | 11 | Argument out of acceptable range. |
UNIMPLEMENTED | 12 | Operation not implemented or supported. |
INTERNAL | 13 | Internal error. |
UNAVAILABLE | 14 | Service is currently unavailable. |
DATA_LOSS | 15 | Unrecoverable data loss or corruption. |
UNAUTHENTICATED | 16 | Request does not have valid authentication credentials. |
# List all objects in a bucketnpx raindrop object list -b my-bucket
# List objects in JSON formatnpx raindrop object list -b my-bucket --output json
# List objects in table formatnpx raindrop object list -b my-bucket --output table
# List all objects in a bucket (the API only supports module IDs)curl -X GET https://api.raindrop.run/v1/object/01jtgtrd37acrqf7k24dggg31s \ -H "Authorization: Bearer lm_apikey_..."
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" } ]}