PUT
/api/v1/container_registry/replication/policies/{policy_id}/
curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/container_registry/replication/policies/{policy_id}/?policy_id=<POLICY_ID>&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": "asdd", "registry_id": 49, "flattening_level": -1, "trigger_type": "manual", "replicate_deletion": false, "override": true, "filters": [ { "type": "name", "value": "" }, { "type": "tag", "decoration": "matches", "value": "" } ], "enabled": true}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/container_registry/replication/policies/{policy_id}/", params={"policy_id": "<POLICY_ID>", "cr_project_id": "<CR_PROJECT_ID>", "project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "policy_name": "asdd", "registry_id": 49, "flattening_level": -1, "trigger_type": "manual", "replicate_deletion": False, "override": True, "filters": [ { "type": "name", "value": "", }, { "type": "tag", "decoration": "matches", "value": "", }, ], "enabled": True, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/container_registry/replication/policies/{policy_id}/");url.search = new URLSearchParams({ policy_id: "<POLICY_ID>", cr_project_id: "<CR_PROJECT_ID>", project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "policy_name": "asdd", "registry_id": 49, "flattening_level": -1, "trigger_type": "manual", "replicate_deletion": false, "override": true, "filters": [ { "type": "name", "value": "" }, { "type": "tag", "decoration": "matches", "value": "" } ], "enabled": true }),});console.log(await response.json());Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”policy_id
required
string
Path parameter policy_id.
Query Parameters
Section titled “Query Parameters”policy_id
required
integer
Policy ID
cr_project_id
required
integer
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
policy_name
string
Example
asddregistry_id
integer
Example
49flattening_level
integer
Example
-1trigger_type
string
Example
manualreplicate_deletion
boolean
Example
falseoverride
boolean
Example
truefilters
Array<object>
object
type
string
Example
namevalue
string
Example
decoration
string
Example
matchesExample
[ { "type": "name", "value": "" }, { "type": "tag", "decoration": "matches", "value": "" }]enabled
boolean
Example
trueResponses
Section titled “Responses”Replication policy updated successfully.
Media typeapplication/json
object
code
integer
data
object
policy_name
string
policy_id
integer
source_registry_id
integer
source_registry_name
string
destination_namespace
string
destination_namespace_replace_count
integer
policy_description
string
trigger_type
string
trigger_value
string
replicate_deletion
boolean
override
boolean
enabled
boolean
customer
integer
project
integer
created_at
string format: date-time
updated_at
string format: date-time
deleted_at
string
errors
object
key
additional properties
message
string
Example
{ "code": 200, "data": { "policy_name": "asdd", "policy_id": 35, "source_registry_id": 50, "source_registry_name": "docker-source", "destination_namespace": "cr-12345", "destination_namespace_replace_count": -1, "policy_description": null, "trigger_type": "manual", "trigger_value": "", "replicate_deletion": false, "override": true, "enabled": true, "customer": 12345, "project": 123, "created_at": "2025-04-29T10:55:31.586787Z", "updated_at": "2025-04-29T11:27:14.077633Z", "deleted_at": null }, "errors": {}, "message": "Replication Policy Updated Successfully"}