environments.clone
POST
/environments/{environmentId}/clone
const url = 'https://example.com/api/environments/example/clone';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"targetName":"example","targetKind":"local"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” environmentId
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
targetName
required
string
targetKind
string
Responses
Section titled “ Responses ”OK
Media type application/json
object
id
required
string
Example generated
{ "id": "example"}