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

# PATCH /api/v1/Environments/{environmentId}/folder

`PATCH /api/v1/Environments/{environmentId}/folder`

## Path parameters

- `environmentId` string, required

## Request body

- CloudEnvironmentFolderBody
  - `recentFolderPaths` string[], nullable

## 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
- `403` — Forbidden
- `404` — Not Found

## Changes

> 4 revisions in range; 1 could not be searched.

- **2026-07-31** `9207efd8fcef` — 3 info
  - removed the `41 (UntrustedUserCreationBlocked)` enum value from the `items/` response property for the response status `400` (media type: text/plain)
  - removed the `41 (UntrustedUserCreationBlocked)` enum value from the `items/` response property for the response status `400` (media type: application/json)
  - removed the `41 (UntrustedUserCreationBlocked)` enum value from the `items/` response property for the response status `400` (media type: text/json)
- **2026-07-26** `b1b4dd83a5f0` — 6 warning
  - added the new `40 (HardDeleteConfirmationRequired)` enum value to the `items/` response property for the response status `400` (media type: text/plain)
  - added the new `40 (HardDeleteConfirmationRequired)` enum value to the `items/` response property for the response status `400` (media type: application/json)
  - added the new `40 (HardDeleteConfirmationRequired)` enum value to the `items/` response property for the response status `400` (media type: text/json)
  - added the new `41 (UntrustedUserCreationBlocked)` enum value to the `items/` response property for the response status `400` (media type: text/plain)
  - …2 more

[Change history](https://skmtc.dev/visualstudio/apis/vsonline/changes/api/v1/Environments/:environmentId/folder/patch.md)

---

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