Skip to content

Create Replication Rules

POST
/api/v1/container_registry/replication/policies/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/container_registry/replication/policies/?cr_project_id=<CR_PROJECT_ID>&project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"policy_name": "replication-ruled",
"policy_description": null,
"registry_id": 40,
"flattening_level": -1,
"trigger_type": "manual",
"trigger_value": null,
"replicate_deletion": false,
"override": true,
"filters": [],
"enabled": true
}'
cr_project_id
required
integer
project_id
required
integer
location
required
string
Allowed values: Delhi Chennai

Deployment region for the resource. Accepted values: Delhi, Chennai.

Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.

Media typeapplication/json
object
policy_name
string

Example

replication-ruled
policy_description
string
nullable

Example

null
registry_id
integer

Example

40
flattening_level
integer

Example

-1
trigger_type
string

Example

manual
trigger_value
string
nullable

Example

null
replicate_deletion
boolean

Example

false
override
boolean

Example

true
filters
Array

Example

[]
enabled
boolean

Example

true

Replication policy created successfully.

Media typeapplication/json
object
code
integer
data
object
replication_details
object
copy_by_chunk
boolean
creation_time
string format: date-time
dest_namespace
string
dest_namespace_replace_count
integer
dest_registry
object
creation_time
string format: date-time
credential
object
access_secret
string
type
string
id
integer
insecure
boolean
name
string
status
string
type
string
update_time
string format: date-time
url
string
enabled
boolean
filters
object
id
integer
name
string
override
boolean
speed
integer
src_registry
object
creation_time
string format: date-time
credential
object
access_key
string
access_secret
string
type
string
description
string
id
integer
insecure
boolean
name
string
status
string
type
string
update_time
string format: date-time
url
string
trigger
object
trigger_settings
object
key
additional properties
type
string
update_time
string format: date-time
errors
object
key
additional properties
message
string

Example

{
"code": 200,
"data": {
"replication_details": {
"copy_by_chunk": false,
"creation_time": "2025-04-29T10:55:31.466Z",
"dest_namespace": "cr-12345",
"dest_namespace_replace_count": -1,
"dest_registry": {
"creation_time": "0001-01-01T00:00:00.000Z",
"credential": {
"access_secret": "*****",
"type": "secret"
},
"id": 0,
"insecure": true,
"name": "Local",
"status": "healthy",
"type": "harbor",
"update_time": "0001-01-01T00:00:00.000Z",
"url": "http://core:8080"
},
"enabled": true,
"filters": null,
"id": 35,
"name": "replication-ruled",
"override": true,
"speed": 0,
"src_registry": {
"creation_time": "2025-04-29T09:54:19.843Z",
"credential": {
"access_key": "<token_name>",
"access_secret": "*****",
"type": "basic"
},
"description": "docker hub source registry",
"id": 50,
"insecure": true,
"name": "docker-source",
"status": "healthy",
"type": "docker-hub",
"update_time": "2025-04-29T10:03:49.718Z",
"url": "https://hub.docker.com"
},
"trigger": {
"trigger_settings": {},
"type": "manual"
},
"update_time": "2025-04-29T10:55:31.466Z"
}
},
"errors": {},
"message": "Replication Policy Created Successfully"
}