v4

latestOpenAPI 3.1.02026-08-02261331761.5 KB
Environments

Copy Environment

Copy environment

This endpoint either duplicates an existing environment to a new environment in the same project, or copies from an existing environment to another existing environment.

The scope object controls which objects will be copied to the target environment.

To clone to a new environment, the user must have write permissions to the containing project. To clone into an existing environment, the user must have write permissions to the target environment.

Copying environments across projects or organizations is not allowed.

post/v2/projects/{proj_id}/envs/{env_id}/copy

Path parameters

proj_idstring required

Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

env_idstring required

Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").

Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").

Request body

conflict_strategy'fail' | 'overwrite'

An enumeration.

Response

Successful Response

keystring required

A URL-friendly name of the environment (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the environment.

idstring uuid required

Unique id of the environment

organization_idstring uuid required

Unique id of the organization that the environment belongs to.

project_idstring uuid required

Unique id of the project that the environment belongs to.

created_atstring date-time required

Date and time when the environment was created (ISO_8601 format).

updated_atstring date-time required

Date and time when the environment was last updated/modified (ISO_8601 format).

avp_policy_store_idstring
namestring required

The name of the environment

descriptionstring

an optional longer description of the environment

custom_branch_namestring

when using gitops feature, an optional branch name for the environment

settingsobject

the settings for this environment