## StopEnvironment `client.environments.stop(EnvironmentStopParamsbody, RequestOptionsoptions?): EnvironmentStopResponse` **post** `/gitpod.v1.EnvironmentService/StopEnvironment` Stops a running environment. Use this method to pause work while preserving the environment's state. The environment can be resumed later using StartEnvironment. ### Examples - Stop an environment: Gracefully stops a running environment while preserving its state. ```yaml environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" ``` ### Parameters - `body: EnvironmentStopParams` - `environmentId?: string` environment_id specifies which environment should be stopped. +required ### Returns - `EnvironmentStopResponse = unknown` ### Example ```typescript import Gitpod from '@gitpod/sdk'; const client = new Gitpod({ bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted }); const response = await client.environments.stop({ environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', }); console.log(response); ``` #### Response ```json {} ```