---
title: "POST /api/v1/Environments/{environmentId}/shutdown"
method: POST
path: "/api/v1/Environments/{environmentId}/shutdown"
tags: ["Environments"]
---

# POST /api/v1/Environments/{environmentId}/shutdown

`POST /api/v1/Environments/{environmentId}/shutdown`

## Path parameters

- `environmentId` string, uuid, required

## Response `200`

Success

- CloudEnvironmentResult
  - `id` string, nullable
  - `type` string, nullable
  - `friendlyName` string, nullable
  - `created` string, date-time
  - `updated` string, date-time
  - `ownerId` string, nullable
  - `state` string, nullable
  - `containerImage` string, nullable
  - `seed` SeedInfoBody
    - `seedType` string, nullable
    - `seedMoniker` string, nullable
    - `gitConfig` GitConfigOptionsBody
      - `userName` string, nullable
      - `userEmail` string, nullable
    - `recurseClone` boolean
    - `repository` RepositoryInfoBody
      - `repoId` integer
      - `name` string, nullable
      - `url` string, nullable
      - `branchName` string, nullable
      - `owner` string, nullable
      - `commitId` string, nullable
      - `prebuildHash` string, nullable
      - `createType` string, nullable
      - `diskUsage` string, nullable
    - `cloneUrl` string, nullable
  - `connection` ConnectionInfoBody
    - `connectionSessionId` string, nullable
    - `connectionSessionPath` string, nullable
    - `connectionServiceUri` string, nullable
    - `hostPublicKeys` string[], nullable
    - `tunnelProperties` TunnelProperties
      - `tunnelId` string, nullable
      - `tunnelName` string, nullable
      - `clusterId` string, nullable
      - `domain` string, nullable
      - `connectTokenExpiration` integer, nullable
      - `connectAccessToken` string, nullable
      - `managePortsTokenExpiration` integer, nullable
      - `managePortsAccessToken` string, nullable
      - `serviceUri` string, nullable
  - `portForwardingConnection` ConnectionInfoBody
    - `connectionSessionId` string, nullable
    - `connectionSessionPath` string, nullable
    - `connectionServiceUri` string, nullable
    - `hostPublicKeys` string[], nullable
    - `tunnelProperties` TunnelProperties
      - `tunnelId` string, nullable
      - `tunnelName` string, nullable
      - `clusterId` string, nullable
      - `domain` string, nullable
      - `connectTokenExpiration` integer, nullable
      - `connectAccessToken` string, nullable
      - `managePortsTokenExpiration` integer, nullable
      - `managePortsAccessToken` string, nullable
      - `serviceUri` string, nullable
  - `container` ContainerInfoBody
    - `id` string, nullable
    - `schemaVersion` string, nullable
  - `recentFolders` string[], nullable
  - `active` string, date-time
  - `platform` string, nullable
  - `location` string, nullable
  - `planId` string, nullable
  - `autoShutdownDelayMinutes` integer
  - `skuName` string, nullable
  - `skuDisplayName` string, nullable
  - `lastStateUpdateReason` string, nullable
  - `lastUsed` string, date-time, nullable
  - `features` object, nullable
  - `gitStatus` GitStatus
    - `commit` string, nullable
    - `branch` string, nullable
    - `hasUnpushedChanges` boolean
    - `hasUncommittedChanges` boolean
    - `ahead` integer
    - `behind` integer
    - `noGitRepo` boolean
    - `autoPush` boolean
  - `subscriptionData` SubscriptionData
    - `subscriptionId` string, nullable
    - `subscriptionState` string, nullable
    - `computeQuota` integer
    - `computeUsage` integer
  - `exportedBlobUrl` string, nullable
  - `accessToken` string, nullable
  - `createFromPrebuild` boolean
  - `templateStatus` string, nullable
  - `billableOwnerType` integer
  - `runtimeConstraints` RuntimeConstraintsBody
    - `allowedPortPrivacySettings` PrivacyEnum[], nullable
    - `imageAllowList` string[], nullable
    - `hostSetupConfig` HostSetupConfig
      - `cloneUrl` string, nullable
      - `branch` string, nullable
      - `path` string, nullable
      - `token` string, nullable
  - `organizationId` string, nullable
  - `prebuildType` string, nullable
  - `storageUtilizationInKb` integer, nullable
  - `displayStorageUtilizationInKb` boolean
  - `clientUsage` ClientUsageSession
    - `sessionId` string, nullable
    - `usageData` object, nullable
  - `resourceTier` integer
  - `failoverDetails` FailoverDetails
    - `failoverEnabled` boolean
    - `failoverRegion` integer
  - `enableAutoPushOnStop` boolean
  - `userControlledFailureReason` integer
  - `usingCopilotWorkspaceConfig` boolean
  - `isStorageV2` boolean, nullable
  - `isAllocatedFromPool` boolean

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found

---

[API](https://skmtc.net/visualstudio/apis/vsonline.md) · [All operations](https://skmtc.net/visualstudio/apis/vsonline/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/visualstudio/vsonline/versions/d55b712ea3ab/schema)
