POST
/api/v1/storage/buckets/{bucket_name}/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/storage/buckets/{bucket_name}/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "is_lock_enabled": false, "is_versioning_enabled": true, "is_encryption_enabled": false}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/storage/buckets/{bucket_name}/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "is_lock_enabled": False, "is_versioning_enabled": True, "is_encryption_enabled": False, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/storage/buckets/{bucket_name}/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "is_lock_enabled": false, "is_versioning_enabled": true, "is_encryption_enabled": false }),});console.log(await response.json());Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”bucket_name
required
string
Bucket Name
Query Parameters
Section titled “Query Parameters”project_id
required
integer
Project ID Find your project id here
location
required
string
Deployment region for the resource. Accepted values: Delhi, Chennai.
Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.
Request Body
Section titled “Request Body”Media typeapplication/json
object
is_lock_enabled
Set to true to enable object lock, or false to disable it.
boolean
Example
falseis_versioning_enabled
Set to true to enable bucket versioning, or false to disable it.
boolean
Example
trueis_encryption_enabled
Set to true to enable bucket encryption, or false to disable it.
boolean
Example
falseResponses
Section titled “Responses”Successfully created a bucket
Media typeapplication/json
object
code
integer
data
object
id
integer
name
string
created_by
integer
status
string
used_MB
number
created_at
string format: date-time
updated_at
string format: date-time
versioning_status
string
lifecycle_configuration_status
string
is_lock_enabled
boolean
is_encryption_enabled
boolean
errors
object
message
string
Example
{ "code": 200, "data": { "id": 12352, "name": "test-bucket-112345", "created_by": 24778, "status": "NEW", "used_MB": null, "created_at": "2025-05-27T05:53:19.879549Z", "updated_at": "2025-05-27T05:53:19.879596Z", "versioning_status": "Enabled", "lifecycle_configuration_status": "Not-Configured", "is_lock_enabled": true, "is_encryption_enabled": true }, "errors": {}, "message": "Success"}Bucket creation failed due to precondition error
Media typeapplication/json
object
code
integer
data
object
errors
string
message
string
Example
{ "code": 412, "data": {}, "errors": "Bucket name is not available.", "message": "Precondition Failed"}