API
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.
Every route below, with its parameters, request and response, errors and samples, is in the API reference.
| Route | What it does |
|---|---|
GET /v1/orgs/:orgId/storage | The org's buckets with their latest daily size and object count. |
GET /v1/orgs/:orgId/storage/:resourceId | A bucket record with its versioning status and latest daily usage. |
GET /v1/orgs/:orgId/storage/:resourceId/objects | One level of the bucket: folders (common prefixes) and files under prefix. |
GET /v1/orgs/:orgId/storage/:resourceId/object | One file's size, type, modification time and metadata. |
GET /v1/orgs/:orgId/storage/:resourceId/download | A download link valid for five minutes. versionId downloads an earlier version. |
GET /v1/orgs/:orgId/storage/:resourceId/object/versions | Every version and delete marker of one file, newest first (versioned buckets). |
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. |
POST /v1/orgs/:orgId/storage/:resourceId/object/versions/delete | Deletes one version of a file for good; its other versions stay. |
GET /v1/orgs/:orgId/storage/:resourceId/deleted | Deleted files in one folder of a versioned bucket (their newest version is a delete marker). |
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. |
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. |
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. |
POST /v1/orgs/:orgId/storage/:resourceId/uploads/multipart/complete | Finishes a multipart upload from its parts' numbers and ETags. |
POST /v1/orgs/:orgId/storage/:resourceId/uploads/multipart/abort | Cancels a multipart upload and discards the parts sent so far. |
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. |
POST /v1/orgs/:orgId/storage/:resourceId/folders | Creates an empty folder under prefix. |
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. |
GET /v1/orgs/:orgId/storage/:resourceId/settings | CORS rules, versioning and lifecycle rules. |
PUT /v1/orgs/:orgId/storage/:resourceId/cors | Replaces the bucket's CORS rules (Cloud's upload rule is kept separately). |
PUT /v1/orgs/:orgId/storage/:resourceId/versioning | Turns versioning on, or suspends it. |
POST /v1/orgs/:orgId/storage/:resourceId/lifecycle | Adds a rule that deletes files under a prefix a number of days after they're written. |
DELETE /v1/orgs/:orgId/storage/:resourceId/lifecycle/:ruleId | Removes a lifecycle rule. |
DELETE /v1/orgs/:orgId/storage/:resourceId | Deletes an empty bucket (old versions of deleted files go with it) and its record. |