The Clone an Environment call creates a copy of an Environment in its entirety, including all its Endpoints. Each Endpoint in the Environment is also cloned and created in the same Domain as the newly cloned Environment.


If you are cloning the Environment, then you may need to make further “mod” calls to change the hostnames and other Endpoint-specific attributes for the member Endpoints.


API Call


http://host/dmadminweb/API/clone/Environment/env_id/newname

[?Domain=Domain_id]


Where:


Host        

Is the hostname and port of the DeployHub Server (e.g.: hostname:8080 or for SaaS console.deployhub.com)

env_id

Is the identifier of the Environment to be cloned. Either its name, its qualified name (i.e.: with its parent Domain(s) included in dot notation) or its internal ID.

Newname

The name of the newly cloned Environment.

Domain_id

If specified this is the identifier of the Domain where the Environment should be created (either its name, its qualified name or its id). If the Domain is not specified, then the cloned Environment is created in the same Domain as the Environment being cloned. Any Endpoints that were cloned as a result of being associated with the cloned Environment are also created in this Domain.


Example Result:


{

       "success": true

}