Skip to main content

Storage Bucket Management Endpoints

Storage buckets are created in the customer’s cloud account. Supported providers:
  • AWS: S3 buckets
  • GCP: Cloud Storage buckets
  • Azure: Storage Accounts (each “bucket” = one Storage Account in a resource group deplo-rg-<name>)
The project’s connected cloud provider determines which is used. Create, list, get, patch, and delete work for all three.

Create Storage Bucket

  • POST /api/:projectSlug/:environmentSlug/storage-buckets - Create a new storage bucket (AWS S3, GCP GCS, or Azure Storage Account)
Description: The name is used as the bucket/account name. It must follow the provider’s naming rules. Important:
  • AWS: 3–63 characters, lowercase, alphanumeric, hyphens, periods; globally unique.
  • GCP: 3–63 characters, lowercase letters, numbers, hyphens, underscores, periods; must not start with goog.
  • Azure: 3–24 characters, lowercase letters and numbers only (no hyphens); globally unique. Example: mybucket or appfiles01.
Request Body:
Encryption is always enabled (true) in the backend; it is not a request field. S3 Bucket Naming Rules:
  • Must be 3 to 63 characters long
  • Must begin and end with a letter or number
  • Can contain lowercase letters (a-z), numbers (0-9), periods (.), and hyphens (-)
  • Cannot contain consecutive periods (..)
  • Cannot be formatted as an IP address (e.g., 192.168.1.1)
  • Cannot start with “xn—” or end with “-s3alias”
  • Must be globally unique across all AWS accounts
Example:
Example Response:
Encryption is always enabled in the backend; it is not returned in the response. For GCP the response includes gcpBucketName; for Azure, azureStorageAccountName. Error Response (Invalid bucket name):
Error Response (Bucket already exists):

List Storage Buckets

  • GET /api/:projectSlug/:environmentSlug/storage-buckets - List all storage buckets for a project environment
Query Parameters:
  • None (filtering is handled by project/environment slugs in the path)
Example:
Example Response:

Get Storage Bucket Details

  • GET /api/:projectSlug/:environmentSlug/storage-buckets/:bucketId - Get details of a specific storage bucket
Example:
Example Response:

Delete Storage Bucket

Path: DELETE /api/:projectSlug/:environmentSlug/resources/:resourceId
Use the bucket’s database ID as resourceId. See Resources API — Delete Resource by ID. All resource types (including storage buckets) are deleted via this unified path.
Query parameter: deleteFromCloud (optional)
  • true (default): Delete the bucket from the cloud (AWS S3, GCP GCS, or Azure Storage), then remove resource connections and soft-delete the resource. The bucket must be empty before cloud deletion. Azure: The storage account must be empty (delete all blobs and containers first).
  • false: Only remove the resource from the database (and its resource connections). The bucket is not deleted from the cloud.
Example (delete from cloud, default):
Example (remove from database only):
Error (bucket not empty): When deleteFromCloud=true, the API returns an error if the bucket contains objects—e.g. "Cannot delete bucket: \"...\" is not empty. Please delete all objects and versions first."