Skip to navigation

Create bucket

Creates an object storage bucket. region is required and must match an Object Storage region identifier configured for the target environment. Do not send a compute site_id. Requires scope: object-storage.write.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
curl -X POST "https://api.ibee.ai/v1/object-storage/buckets?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "production-assets", "region": "in-south-2"}'

Authentication

AuthorizationBearer

IBEE platform API token. Production tokens start with ibee_prod_key_; development tokens start with ibee_dev_key_. Use a token only with its matching gateway environment.

Query parameters

workspace_idstringRequiredformat: "^[1-9][0-9]*$">=1 character

The positive numeric workspace ID to scope this request to. Zero, negative, and non-numeric values are rejected.

Request

This endpoint expects an object.
namestringRequired3-63 characters
Unique bucket name within the workspace.
regionstringRequired

Required Object Storage region identifier. This must match a region configured for the target environment; it is not a compute site_id or display name.

is_publicbooleanOptionalDefaults to false
Whether the bucket allows unauthenticated read access.
object_lock_enabledbooleanOptionalDefaults to false

Must be true when default_retention is provided.

default_retentionobjectOptional

Optional default object retention. Supply exactly one of days or years, and set object_lock_enabled to true.

tagslist of stringsOptional
Optional tags stored alongside bucket metadata.

Response

Bucket created successfully.
namestring
Unique bucket name within the workspace.
is_publicboolean
Whether the bucket allows unauthenticated read access.
regionstring or null
Object storage region the bucket lives in.
planstring or null
Storage plan billed for the bucket.
statusstring or null
Current bucket status.
site_idstring or null
Identifier of the site holding the bucket. Placement is managed internally.
site_namestring or null

Human-readable name of the site holding the bucket.

bucket_lock_enabledboolean
Whether object lock is enabled on the bucket.
created_atdatetime or null

When the bucket was created (ISO 8601).

updated_atdatetime or null

When the bucket settings were last changed (ISO 8601).

object_countintegerOptional
Number of objects stored in the bucket. Returned by the read and list endpoints only.
total_sizeintegerOptional
Total size in bytes of the objects stored in the bucket. Returned by the read and list endpoints only.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
413
Content Too Large Error
422
Unprocessable Entity Error
423
Locked Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error