API Reference
storage Endpoints
API endpoints for the storage resource group
All endpoints require a valid Bearer token in the Authorization header.
Generate a presigned URL for uploading a file to R2.
| Field | Type | Required | Description |
|---|
key | string | Yes | Object key (path) in the bucket |
contentType | string | Yes | MIME type of the file |
expiresIn | number | No | URL expiry in seconds (default: 3600) |
| Status | Description |
|---|
200 | Success — returns { url: string } |
400 | Invalid request or storage operation failed |
401 | Unauthorized |
500 | InternalError |
Generate a presigned URL for downloading a file from R2.
| Field | Type | Required | Description |
|---|
key | string | Yes | Object key to download |
expiresIn | number | No | URL expiry in seconds (default: 3600) |
| Status | Description |
|---|
200 | Success — returns { url: string } |
400 | Invalid request or storage operation failed |
401 | Unauthorized |
500 | InternalError |
Delete an object from the bucket.
| Field | Type | Required | Description |
|---|
key | string | Yes | Object key to delete |
| Status | Description |
|---|
200 | Success — returns { deleted: true } |
400 | Invalid request or storage operation failed |
401 | Unauthorized |
500 | InternalError |
List objects in the bucket, optionally filtered by prefix.
| Name | In | Type | Required | Description |
|---|
prefix | query | string | No | Key prefix filter |
| Status | Description |
|---|
200 | Success — returns { keys: string[] } |
400 | Invalid request or storage operation failed |
401 | Unauthorized |
500 | InternalError |
Get metadata for a specific object.
| Name | In | Type | Required | Description |
|---|
key | path | string | Yes | Object key |
| Status | Description |
|---|
200 | Success — returns { key, contentType, contentLength, lastModified, etag } |
400 | Invalid request or storage operation failed |
401 | Unauthorized |
500 | InternalError |