Skip to main content

Clones an environment

POST 

/api/admin/environments/:name/clone

Given an existing environment name and a set of options, this will create a copy of that environment

Request

Path Parameters

    name stringrequired

Body

required

cloneEnvironmentSchema

    name stringrequired

    The name of the new cloned environment, this cannot be changed later

    Example: development
    type stringrequired

    Updates the type of environment (i.e. development or production).

    Example: development
    projects string[]

    A list of projects that should be included in the cloned environment.

    clonePermissions boolean

    Copies the RBAC permissions from the source environment if true. Defaults to true

Responses

environmentSchema

Schema

    name stringrequired

    The name of the environment

    Example: my-dev-env
    type stringrequired
    Example: development
    enabled booleanrequired

    true if the environment is enabled for the project, otherwise false.

    Example: true
    protected booleanrequired

    true if the environment is protected, otherwise false. A protected environment can not be deleted.

    Example: true
    sortOrder integerrequired

    Priority of the environment in a list of environments, the lower the value, the higher up in the list the environment will appear. Needs to be an integer

    Example: 3
    projectCount integernullable

    The number of projects with this environment

    Example: 10
    apiTokenCount integernullable

    The number of API tokens for the project environment

    Example: 6
    enabledToggleCount integernullable

    The number of enabled toggles for the project environment

    Example: 10
Loading...