Skip to main content

restartEnvironment

client.environments.restartEnvironment(id: string, data?: Record<string, unknown>): Promise<unknown>

Restarts an environment.

Performs a stop followed by a start on the environment. Useful for applying configuration changes that require a fresh boot.

Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the environment to restart
dataRecord<string, unknown>NoOptional restart configuration

Returns

Promise<unknown> — A promise that resolves when the environment has restarted

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.environments.restartEnvironment('id');
console.log(result);