API reference
Storage
Browse and manage S3 buckets: files, uploads, CORS, versioning and lifecycle rules.
These routes back the file browser in Cloud. Uploads and downloads go straight to S3 through short-lived links; the API never handles file bodies. See Buckets.
GET /v1/orgs/:orgId/storage
The org's buckets with their latest daily size and object count.
Auth: user access token or platform agent key · Scope: resources:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
Response 200
{
buckets: {
usage: null | {
sizeBytes?: number
objects?: number
at?: number
}
region: string
type: "repository" | "database" | "bucket"
name: string
status?: "error" | "active" | "creating" | "deleting"
createdAt?: number
updatedAt?: number
orgId: string
resourceId: string
createdBy: string
projectId?: string
location: string
arn?: string
physicalName: string
restoredFrom?: string
pendingSetup?: boolean
}[]
}GET /v1/orgs/:orgId/storage/:resourceId
A bucket record with its versioning status and latest daily usage.
Auth: user access token or platform agent key · Scope: resources:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Response 200
{
bucket: {
region: string
type: "repository" | "database" | "bucket"
name: string
status?: "error" | "active" | "creating" | "deleting"
createdAt?: number
updatedAt?: number
orgId: string
resourceId: string
createdBy: string
projectId?: string
location: string
arn?: string
physicalName: string
restoredFrom?: string
pendingSetup?: boolean
}
versioning: null | "Enabled" | "Suspended" | "Disabled"
usage: null | {
sizeBytes?: number
objects?: number
at?: number
}
}Errors
| Status | Message |
|---|---|
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
GET /v1/orgs/:orgId/storage/:resourceId/objects
One level of the bucket: folders (common prefixes) and files under prefix.
Auth: user access token or platform agent key · Scope: resources:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
| Query parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
prefix | string | No | "" | up to 1,024 characters |
cursor | string | No | up to 2,048 characters | |
limit | integer | No | 100 | ≥ 1; coerced from a string |
Response 200
{
prefix: string
folders: string[]
files: {
key: string
size: number
lastModified?: number
etag?: string
storageClass: "AWS_BACKUP_LOW_COST_WARM" | "AWS_BACKUP_WARM" | "DEEP_ARCHIVE" | "EXPRESS_ONEZONE" | "FSX_ONTAP" | "FSX_OPENZFS" | "GLACIER" | "GLACIER_IR" | "INTELLIGENT_TIERING" | "ONEZONE_IA" | "OUTPOSTS" | "REDUCED_REDUNDANCY" | "SNOW" | "STANDARD" | "STANDARD_IA"
}[]
cursor?: string
}Errors
| Status | Message |
|---|---|
400 | Folder paths end with /. |
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
GET /v1/orgs/:orgId/storage/:resourceId/object
One file's size, type, modification time and metadata.
Auth: user access token or platform agent key · Scope: resources:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
| Query parameter | Type | Required | Notes |
|---|---|---|---|
key | string | Yes | up to 1,024 characters |
Response 200
{
object: {
key: string
size: number
contentType?: string
lastModified?: number
etag?: string
storageClass: "AWS_BACKUP_LOW_COST_WARM" | "AWS_BACKUP_WARM" | "DEEP_ARCHIVE" | "EXPRESS_ONEZONE" | "FSX_ONTAP" | "FSX_OPENZFS" | "GLACIER" | "GLACIER_IR" | "INTELLIGENT_TIERING" | "ONEZONE_IA" | "OUTPOSTS" | "REDUCED_REDUNDANCY" | "SNOW" | "STANDARD" | "STANDARD_IA"
versionId?: string
cacheControl?: string
contentEncoding?: string
contentDisposition?: string
encryption?: "AES256" | "aws:backup" | "aws:fsx" | "aws:kms" | "aws:kms:dsse"
metadata: {
[key: string]: string
}
}
}Errors
| Status | Message |
|---|---|
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
GET /v1/orgs/:orgId/storage/:resourceId/download
A download link valid for five minutes. versionId downloads an earlier version.
Auth: user access token or platform agent key · Scope: resources:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
| Query parameter | Type | Required | Notes |
|---|---|---|---|
key | string | Yes | up to 1,024 characters |
versionId | string | No | 1–1,024 characters |
Response 200
{
url: string
expiresIn: number
}Errors
| Status | Message |
|---|---|
400 | Folders can't be downloaded. |
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
GET /v1/orgs/:orgId/storage/:resourceId/object/versions
Every version and delete marker of one file, newest first (versioned buckets).
Auth: user access token or platform agent key · Scope: resources:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
| Query parameter | Type | Required | Notes |
|---|---|---|---|
key | string | Yes | up to 1,024 characters |
Response 200
{
key: string
versions: {
versionId: string
isLatest: boolean
deleteMarker: boolean
lastModified?: number
size?: number
etag?: string
}[]
truncated: boolean
}Errors
| Status | Message |
|---|---|
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
POST /v1/orgs/:orgId/storage/:resourceId/object/restore
Makes an earlier version of a file current again (copied on top, so history is kept). With the newest delete marker of a deleted file, removes the marker and so brings the file back.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
key | string | Yes | up to 1,024 characters |
versionId | string | Yes | 1–1,024 characters |
Response 200
{
restored: "undeleted"
} | {
restored: "copied"
}Errors
| Status | Message |
|---|---|
400 | Pick a version with content to restore. |
404 | Bucket not found |
404 | Version not found. |
409 | This is already the current version. |
409 | … is too large to copy in one request. |
Errors from AWS are mapped as in AWS errors.
POST /v1/orgs/:orgId/storage/:resourceId/object/versions/delete
Deletes one version of a file for good; its other versions stay.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
key | string | Yes | up to 1,024 characters |
versionId | string | Yes | 1–1,024 characters |
Response 204 with no body.
Errors
| Status | Message |
|---|---|
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
GET /v1/orgs/:orgId/storage/:resourceId/deleted
Deleted files in one folder of a versioned bucket (their newest version is a delete marker).
Auth: user access token or platform agent key · Scope: resources:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
| Query parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
prefix | string | No | "" | up to 1,024 characters |
cursor | string | No | up to 4,096 characters | |
limit | integer | No | 1000 | ≥ 1; coerced from a string |
Response 200
{
prefix: string
files: {
key: string
deletedAt?: number
versionId: string
}[]
cursor?: string
}Errors
| Status | Message |
|---|---|
400 | Folder paths end with /. |
400 | Invalid cursor. |
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
POST /v1/orgs/:orgId/storage/:resourceId/objects/move
Moves or renames files and folders (copy, then delete the original); never overwrites. Folders move in batches: done: false means call again with the same moves and resume: true.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
files | object[] | No | [] | |
files[].from | string | Yes | up to 1,024 characters | |
files[].to | string | Yes | up to 1,024 characters | |
folders | object[] | No | [] | up to 100 items |
folders[].from | string | Yes | up to 1,024 characters | |
folders[].to | string | Yes | up to 1,024 characters | |
resume | boolean | No | false |
Also checked: Nothing to move.
Response 200
{
moved: number
done: boolean
}Errors
| Status | Message |
|---|---|
400 | File names can't end with /. |
400 | … is already there. |
400 | Pick a folder, not the whole bucket. |
400 | Folder paths end with /. |
400 | A folder can't move into itself. |
404 | Bucket not found |
404 | … doesn't exist. |
409 | … already exists. |
409 | … is too large to copy in one request. |
409 | A folder named … already exists. |
409 | Couldn't delete … file…: … |
Errors from AWS are mapped as in AWS errors.
POST /v1/orgs/:orgId/storage/:resourceId/uploads/multipart
Starts a multipart upload for a large file (up to 5 TB): the part size and how many parts to send.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
key | string | Yes | up to 1,024 characters |
contentType | string | "" | Yes | up to 255 characters; matches ^[\w.+-]+\/[\w.+-]+(\s*;.*)?$ |
size | integer | Yes | ≥ 1 |
Response 201
{
key: string
uploadId: string
partSize: number
parts: number
contentType: string
}Errors
| Status | Message |
|---|---|
400 | File names can't end with /. |
404 | Bucket not found |
413 | … is larger than 5 TB. |
Errors from AWS are mapped as in AWS errors.
POST /v1/orgs/:orgId/storage/:resourceId/uploads/multipart/parts
Upload links (15 minutes) for parts of a multipart upload; the browser PUTs each part and keeps its ETag.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
key | string | Yes | up to 1,024 characters |
uploadId | string | Yes | 1–1,024 characters |
partNumbers | integer[] | Yes | at least 1 item; each 1–10000 |
Response 200
{
urls: {
partNumber: number
url: string
}[]
expiresIn: number
}Errors
| Status | Message |
|---|---|
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
POST /v1/orgs/:orgId/storage/:resourceId/uploads/multipart/complete
Finishes a multipart upload from its parts' numbers and ETags.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
key | string | Yes | up to 1,024 characters |
uploadId | string | Yes | 1–1,024 characters |
parts | object[] | Yes | 1–10,000 items |
parts[].partNumber | integer | Yes | 1–10000 |
parts[].etag | string | Yes | 1–256 characters |
Response 200
{
key: string
}Errors
| Status | Message |
|---|---|
400 | Some parts didn't arrive. Upload the file again. |
404 | Bucket not found |
404 | This upload was canceled or has expired. |
Errors from AWS are mapped as in AWS errors.
POST /v1/orgs/:orgId/storage/:resourceId/uploads/multipart/abort
Cancels a multipart upload and discards the parts sent so far.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
key | string | Yes | up to 1,024 characters |
uploadId | string | Yes | 1–1,024 characters |
Response 204 with no body.
Errors
| Status | Message |
|---|---|
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
POST /v1/orgs/:orgId/storage/:resourceId/uploads
Upload links (PUT, 15 minutes, up to 5 GB each). The browser sends each file straight to S3.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
files | object[] | Yes | at least 1 item |
files[].key | string | Yes | up to 1,024 characters |
files[].contentType | string | "" | Yes | up to 255 characters; matches ^[\w.+-]+\/[\w.+-]+(\s*;.*)?$ |
files[].size | integer | Yes | ≥ 0 |
Response 200
{
uploads: {
key: string
url: string
contentType: string
}[]
expiresIn: number
}Errors
| Status | Message |
|---|---|
400 | File names can't end with /. |
404 | Bucket not found |
413 | … is larger than 5 GB: upload it in parts. |
Errors from AWS are mapped as in AWS errors.
POST /v1/orgs/:orgId/storage/:resourceId/folders
Creates an empty folder under prefix.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
prefix | string | No | "" | up to 1,024 characters |
name | string | Yes | 1–255 characters |
Response 201
{
key: string
}Errors
| Status | Message |
|---|---|
400 | Folder paths end with /. |
400 | Folder names can't contain /. |
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
POST /v1/orgs/:orgId/storage/:resourceId/objects/delete
Deletes files and folders (with everything in them). done: false means call again to finish large folders.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
keys | string[] | No | [] | each up to 1,024 characters |
prefixes | string[] | No | [] | up to 100 items; each up to 1,024 characters |
Also checked: Nothing to delete.
Response 200
{
deleted: number
done: boolean
}Errors
| Status | Message |
|---|---|
400 | Pick folders to delete, not the whole bucket. |
400 | Folder paths end with /. |
404 | Bucket not found |
409 | Couldn't delete … file…: … |
Errors from AWS are mapped as in AWS errors.
GET /v1/orgs/:orgId/storage/:resourceId/settings
CORS rules, versioning and lifecycle rules.
Auth: user access token or platform agent key · Scope: resources:read
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Response 200
{
versioning: string
cors: {
ID?: string
AllowedHeaders?: string[]
AllowedMethods?: string[]
AllowedOrigins?: string[]
ExposeHeaders?: string[]
MaxAgeSeconds?: number
}[]
cloudCors: {
ID?: string
AllowedHeaders?: string[]
AllowedMethods?: string[]
AllowedOrigins?: string[]
ExposeHeaders?: string[]
MaxAgeSeconds?: number
}
lifecycle: {
id: string
prefix: string
enabled: boolean
expirationDays?: number
noncurrentDays?: number
other: boolean
}[]
abortUploadsDays?: number
publicAccessBlocked: boolean
}Errors
| Status | Message |
|---|---|
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
PUT /v1/orgs/:orgId/storage/:resourceId/cors
Replaces the bucket's CORS rules (Cloud's upload rule is kept separately).
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
rules | object[] | Yes | |
rules[].ID | string | No | up to 255 characters |
rules[].AllowedOrigins | string[] | Yes | 1–50 items; each 1–255 characters |
rules[].AllowedMethods | ("GET" | "PUT" | "POST" | "DELETE" | "HEAD")[] | Yes | at least 1 item |
rules[].AllowedHeaders | string[] | No | up to 50 items; each 1–255 characters |
rules[].ExposeHeaders | string[] | No | up to 50 items; each 1–255 characters |
rules[].MaxAgeSeconds | integer | No | 0–604800 |
Response 200
{
cors: {
AllowedOrigins: string[]
AllowedMethods: ("GET" | "PUT" | "HEAD" | "POST" | "DELETE")[]
ID?: string
AllowedHeaders?: string[]
ExposeHeaders?: string[]
MaxAgeSeconds?: number
}[]
}Errors
| Status | Message |
|---|---|
400 | si-cloud-uploads is reserved for Cloud uploads. |
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
PUT /v1/orgs/:orgId/storage/:resourceId/versioning
Turns versioning on, or suspends it.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
enabled | boolean | Yes |
Response 200
{
versioning: string
}Errors
| Status | Message |
|---|---|
404 | Bucket not found |
Errors from AWS are mapped as in AWS errors.
POST /v1/orgs/:orgId/storage/:resourceId/lifecycle
Adds a rule that deletes files under a prefix a number of days after they're written.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Request body
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
prefix | string | No | "" | up to 1,024 characters |
days | integer | Yes | 1–3650 | |
noncurrentDays | integer | No | 1–3650 |
Response 201
{
rule: {
id: string
prefix: string
enabled: boolean
expirationDays?: number
noncurrentDays?: number
other: boolean
}
lifecycle: {
id: string
prefix: string
enabled: boolean
expirationDays?: number
noncurrentDays?: number
other: boolean
}[]
}Errors
| Status | Message |
|---|---|
404 | Bucket not found |
409 | A bucket can have 50 rules here. |
Errors from AWS are mapped as in AWS errors.
DELETE /v1/orgs/:orgId/storage/:resourceId/lifecycle/:ruleId
Removes a lifecycle rule.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
:ruleId | Rule id: a storage lifecycle rule (as returned by the settings or lifecycle routes), an issue automation rule (rul_…) or a Mirage AutoMod rule (mar_…). |
Response 200
{
lifecycle: {
id: string
prefix: string
enabled: boolean
expirationDays?: number
noncurrentDays?: number
other: boolean
}[]
}Errors
| Status | Message |
|---|---|
404 | Bucket not found |
404 | Rule not found |
Errors from AWS are mapped as in AWS errors.
DELETE /v1/orgs/:orgId/storage/:resourceId
Deletes an empty bucket (old versions of deleted files go with it) and its record.
Auth: user access token or platform agent key · Scope: resources:write
| Path parameter | Description |
|---|---|
:orgId | Organization id (org_…). |
:resourceId | Resource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id. |
Response 204 with no body.
Errors
| Status | Message |
|---|---|
404 | Bucket not found |
409 | Delete every file in this bucket first. |
409 | Still removing old file versions. Try again to continue. |
409 | Couldn't delete … file…: … |
409 | Files were added while deleting. Delete them first. |
Errors from AWS are mapped as in AWS errors.