Update a workspace (operator; turning auto_apply on or requires_approval off needs admin)

Changed on
put/workspaces/{workspaceId}

Request

  • Base URL: /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/v1/workspaces/{workspaceId}
  • Auth: HTTP bearer

Path parameters

workspaceIdstring required

Request body

namestring
descriptionstring
repo_urlstring
repo_branchstring
working_dirstring

Repo-relative path to the leaf portal runs in. Stored canonical: "./envs/production", "envs//production", "envs/./production" and "envs/production/" all name one directory to the executor, so they are all stored as "envs/production". Omit on update to keep the stored value.

tofu_versionstring
environment'development' | 'staging' | 'production'
auto_applyboolean
requires_approvalboolean
vcs_trigger_enabledboolean

Response

Updated workspace

idstring required
org_idstring required
namestring required
descriptionstring
source'vcs' | 'upload' required
repo_urlstring required
repo_branchstring required
working_dirstring required
tofu_versionstring required
environment'development' | 'staging' | 'production' required
auto_applyboolean required
requires_approvalboolean required
vcs_trigger_enabledboolean required
lockedboolean required
locked_bystring nullable
current_run_idstring nullable
current_config_version_idstring
created_bystring required
created_atstring date-time required
updated_atstring date-time required
last_run_statusstring nullable

List-view rollup.

last_run_atstring date-time nullable

List-view rollup.

resource_countinteger

List-view rollup.

effective_role'viewer' | 'operator' | 'admin' | 'owner'

The caller's role on this workspace: their org role, or a higher role one of their teams holds through a workspace team grant. Single-workspace reads only.

Changes