跳转到内容

environments.clone

POST
/environments/{environmentId}/clone
curl --request POST \
--url https://example.com/api/environments/example/clone \
--header 'Content-Type: application/json' \
--data '{ "targetName": "example", "targetKind": "local" }'

Clones one active environment into a new environment in the same project. Public docs: /docs/environments/model/#environment-lifecycle

environmentId
required
string
>= 1 characters
Media type application/json
object
targetName
required
string
>= 1 characters
targetKind
string
Allowed values: local development test staging production preview custom

OK

Media type application/json
object
id
required
string
Example generated
{
"id": "example"
}