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 parameterDescription
:orgIdOrganization 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource 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

StatusMessage
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.
Query parameterTypeRequiredDefaultNotes
prefixstringNo""up to 1,024 characters
cursorstringNoup to 2,048 characters
limitintegerNo100≥ 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

StatusMessage
400Folder paths end with /.
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.
Query parameterTypeRequiredNotes
keystringYesup 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

StatusMessage
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.
Query parameterTypeRequiredNotes
keystringYesup to 1,024 characters
versionIdstringNo1–1,024 characters

Response 200

{
  url: string
  expiresIn: number
}

Errors

StatusMessage
400Folders can't be downloaded.
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.
Query parameterTypeRequiredNotes
keystringYesup to 1,024 characters

Response 200

{
  key: string
  versions: {
    versionId: string
    isLatest: boolean
    deleteMarker: boolean
    lastModified?: number
    size?: number
    etag?: string
  }[]
  truncated: boolean
}

Errors

StatusMessage
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredNotes
keystringYesup to 1,024 characters
versionIdstringYes1–1,024 characters

Response 200

{
  restored: "undeleted"
} | {
  restored: "copied"
}

Errors

StatusMessage
400Pick a version with content to restore.
404Bucket not found
404Version not found.
409This 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredNotes
keystringYesup to 1,024 characters
versionIdstringYes1–1,024 characters

Response 204 with no body.

Errors

StatusMessage
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.
Query parameterTypeRequiredDefaultNotes
prefixstringNo""up to 1,024 characters
cursorstringNoup to 4,096 characters
limitintegerNo1000≥ 1; coerced from a string

Response 200

{
  prefix: string
  files: {
    key: string
    deletedAt?: number
    versionId: string
  }[]
  cursor?: string
}

Errors

StatusMessage
400Folder paths end with /.
400Invalid cursor.
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredDefaultNotes
filesobject[]No[]
files[].fromstringYesup to 1,024 characters
files[].tostringYesup to 1,024 characters
foldersobject[]No[]up to 100 items
folders[].fromstringYesup to 1,024 characters
folders[].tostringYesup to 1,024 characters
resumebooleanNofalse

Also checked: Nothing to move.

Response 200

{
  moved: number
  done: boolean
}

Errors

StatusMessage
400File names can't end with /.
400… is already there.
400Pick a folder, not the whole bucket.
400Folder paths end with /.
400A folder can't move into itself.
404Bucket not found
404… doesn't exist.
409… already exists.
409… is too large to copy in one request.
409A folder named … already exists.
409Couldn'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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredNotes
keystringYesup to 1,024 characters
contentTypestring | ""Yesup to 255 characters; matches ^[\w.+-]+\/[\w.+-]+(\s*;.*)?$
sizeintegerYes≥ 1

Response 201

{
  key: string
  uploadId: string
  partSize: number
  parts: number
  contentType: string
}

Errors

StatusMessage
400File names can't end with /.
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredNotes
keystringYesup to 1,024 characters
uploadIdstringYes1–1,024 characters
partNumbersinteger[]Yesat least 1 item; each 1–10000

Response 200

{
  urls: {
    partNumber: number
    url: string
  }[]
  expiresIn: number
}

Errors

StatusMessage
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredNotes
keystringYesup to 1,024 characters
uploadIdstringYes1–1,024 characters
partsobject[]Yes1–10,000 items
parts[].partNumberintegerYes1–10000
parts[].etagstringYes1–256 characters

Response 200

{
  key: string
}

Errors

StatusMessage
400Some parts didn't arrive. Upload the file again.
404Bucket not found
404This 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredNotes
keystringYesup to 1,024 characters
uploadIdstringYes1–1,024 characters

Response 204 with no body.

Errors

StatusMessage
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredNotes
filesobject[]Yesat least 1 item
files[].keystringYesup to 1,024 characters
files[].contentTypestring | ""Yesup to 255 characters; matches ^[\w.+-]+\/[\w.+-]+(\s*;.*)?$
files[].sizeintegerYes≥ 0

Response 200

{
  uploads: {
    key: string
    url: string
    contentType: string
  }[]
  expiresIn: number
}

Errors

StatusMessage
400File names can't end with /.
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredDefaultNotes
prefixstringNo""up to 1,024 characters
namestringYes1–255 characters

Response 201

{
  key: string
}

Errors

StatusMessage
400Folder paths end with /.
400Folder names can't contain /.
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredDefaultNotes
keysstring[]No[]each up to 1,024 characters
prefixesstring[]No[]up to 100 items; each up to 1,024 characters

Also checked: Nothing to delete.

Response 200

{
  deleted: number
  done: boolean
}

Errors

StatusMessage
400Pick folders to delete, not the whole bucket.
400Folder paths end with /.
404Bucket not found
409Couldn'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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource 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

StatusMessage
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredNotes
rulesobject[]Yes
rules[].IDstringNoup to 255 characters
rules[].AllowedOriginsstring[]Yes1–50 items; each 1–255 characters
rules[].AllowedMethods("GET" | "PUT" | "POST" | "DELETE" | "HEAD")[]Yesat least 1 item
rules[].AllowedHeadersstring[]Noup to 50 items; each 1–255 characters
rules[].ExposeHeadersstring[]Noup to 50 items; each 1–255 characters
rules[].MaxAgeSecondsintegerNo0–604800

Response 200

{
  cors: {
    AllowedOrigins: string[]
    AllowedMethods: ("GET" | "PUT" | "HEAD" | "POST" | "DELETE")[]
    ID?: string
    AllowedHeaders?: string[]
    ExposeHeaders?: string[]
    MaxAgeSeconds?: number
  }[]
}

Errors

StatusMessage
400si-cloud-uploads is reserved for Cloud uploads.
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredNotes
enabledbooleanYes

Response 200

{
  versioning: string
}

Errors

StatusMessage
404Bucket 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.

Request body

FieldTypeRequiredDefaultNotes
prefixstringNo""up to 1,024 characters
daysintegerYes1–3650
noncurrentDaysintegerNo1–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

StatusMessage
404Bucket not found
409A 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource id (res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.
:ruleIdRule 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

StatusMessage
404Bucket not found
404Rule 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 parameterDescription
:orgIdOrganization id (org_…).
:resourceIdResource 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

StatusMessage
404Bucket not found
409Delete every file in this bucket first.
409Still removing old file versions. Try again to continue.
409Couldn't delete … file…: …
409Files were added while deleting. Delete them first.

Errors from AWS are mapped as in AWS errors.