environments.rename
POST
/environments/{environmentId}/rename
const url = 'https://example.com/api/environments/example/rename';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example"}'};
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/rename \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'Renames one active environment without changing configuration or deployments. 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
name
required
string
Example generated
{ "name": "example"}Responses
Section titled “ Responses ”OK
Media type application/json
object
id
required
string
Example generated
{ "id": "example"}