Clone a Package Management Environment¶
-
PUT
/api/v1.2/package/<env ID>/clone_environment
¶
Use this API to clone a package management environment. You cannot change the Python and R versions.
Required Role¶
The following users can make this API call:
- Users who belong to the system-admin or system-user group.
- Users who belong to a group associated with a role that allows creating an environment. See Managing Groups and Managing Roles for more information.
Parameters¶
Note
Parameters marked in bold are mandatory. Others are optional and have default values.
Parameter | Description |
---|---|
name | Provide a name to the environment. By default, the cloned environment inherits the parent environment’s name with -clone as it suffix that is <environmentname-clone>. |
description | You can add a brief description about the environment. |
Request API Syntax¶
curl -X PUT -H "X-AUTH-TOKEN: <API-TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"name": "<EnvironmentName>", "description": "<Description>"}' \
"https://gcp.qubole.com/api/v1.2/package/<env ID>/clone_environment"
Sample API Request¶
Here is a sample request to clone a package environment that has 100 as its ID.
curl -X PUT -H "X-AUTH-TOKEN: <API-TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"name": "PackageEnv2.0", "description": "Environment for adding packages"}' \
"https://gcp.qubole.com/api/v1.2/package/100/clone_environment"