POST
/api/v1/storage/bucket-replication/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/storage/bucket-replication/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "source_bucket": "first-bucket", "source_region": "Delhi", "destination_bucket": "second-bucket", "destination_region": "Chennai", "priority": "1"}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/storage/bucket-replication/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "source_bucket": "first-bucket", "source_region": "Delhi", "destination_bucket": "second-bucket", "destination_region": "Chennai", "priority": "1", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/storage/bucket-replication/");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({ "source_bucket": "first-bucket", "source_region": "Delhi", "destination_bucket": "second-bucket", "destination_region": "Chennai", "priority": "1" }),});console.log(await response.json());Replication rule can be added only if versioning in both buckets are enabled and they do not belong to the same region.
Parameters
Section titled “Parameters”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
source_bucket
string
Example
first-bucketsource_region
string
Example
Delhidestination_bucket
string
Example
second-bucketdestination_region
string
Example
Chennaipriority
string
Example
1Responses
Section titled “Responses”Replication rule created successfully.
Media typeapplication/json
object
code
integer
data
object
id
integer
user
integer
source_bucket
string
destination_bucket
string
source_bucket_location
string
destination_bucket_location
string
enabled
boolean
created_at
string format: date-time
errors
object
message
string
Example
{ "code": 200, "data": { "id": 123, "user": 12345, "source_bucket": "first-bucket", "destination_bucket": "second-bucket", "source_bucket_location": "Delhi", "destination_bucket_location": "Chennai", "enabled": true, "created_at": "2025-05-28T05:18:20.386151Z" }, "errors": {}, "message": "Success"}Precondition failed due to replication rule conflict.
Media typeapplication/json
object
code
integer
data
object
errors
string
message
string
Example
{ "code": 412, "data": {}, "errors": "add-this-bucket to this-is-another-bucket replication rule already exists.", "message": "Precondition Failed"}