v1

latestSwagger 2.02026-08-04232286653.5 KB
S3Buckets

Creates an S3 bucket in the project and returns the created bucket.

post/projects/{project_id}/storage/s3/buckets

Path parameters

project_idstring required

ID of the project to create the bucket in.

Request body

locationstring required

Location to create the bucket in.

namestring required

Name for the new bucket. Must be DNS-compliant: 3-63 characters, using lowercase letters, numbers, and hyphens.

object_lock_enabledboolean

Whether to enable object lock on the new bucket. Requires versioning to be enabled and cannot be disabled once enabled.

retention_periodinteger

Length of the object lock retention period, in the unit given by retention_period_unit.

retention_period_unitstring

enum: days,years

tagsobject

Tags to apply to the new bucket as key-value pairs.

versioning_statestring

enum: disabled,enabled,suspended

Example request

{
  "location": "us-eaststaging1-a",
  "name": "my-new-bucket",
  "retention_period": 30
}

Response

archived_atstring

Archive timestamp of the bucket, in RFC3339 format.

bucket_sizenumber float

Size of the bucket, in GiB.

created_atstring required

Creation timestamp of the bucket, in RFC3339 format.

locationstring required

Location where the bucket is hosted.

namestring required

Name of the bucket.

object_lock_enabledboolean required

Whether object lock is enabled.

project_idstring required

ID of the project that owns the bucket.

retention_modestring

enum: governance,compliance

retention_periodinteger

Length of the object lock retention period, in the unit given by retention_period_unit.

retention_period_unitstring

enum: days,years

s3_urlstring

Endpoint URL for accessing the bucket.

tagsobject

Tags applied to the bucket as key-value pairs.

updated_atstring required

Last update timestamp of the bucket, in RFC3339 format.

user_idstring required

ID of the S3 user that owns the bucket.

versioning_statestring required

enum: disabled,enabled,suspended

Example response

{
  "archived_at": "2021-12-03T19:58:34Z",
  "bucket_size": 2.42,
  "created_at": "2021-12-03T19:58:34Z",
  "location": "us-eaststaging1-a",
  "name": "my-awesome-bucket",
  "project_id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
  "retention_period": 30,
  "s3_url": "https://object.us-eaststaging7-b.crusoecloudcompute.com/my-first-bucket",
  "updated_at": "2021-12-03T19:58:34Z",
  "user_id": "S3U_..."
}