Skip to main content
Update the configuration of an existing workspace in your Mage Pro cluster. PUT /api/workspaces/{workspace_name}

Path Parameters

string
required
Name of the workspace to update. You can find the workspace name on your Mage Pro cluster’s /apps/workspaces page.

Request Body Parameters

All request body parameters are nested under the workspace object.
string
required
The action to perform on the workspace. Supported values: "stop", "resume", "patch", "add_to_ingress". See the Supported Actions section below for details on each action and which parameters they support.
string
Optional. YAML configuration string for the container. Used with the patch action.
Allows you to update container-level settings such as environment variables, resource limits, and other container configurations. For example, updating environment variables:
object
Optional. Dictionary/object containing lifecycle configuration. Used with the patch action. Defines lifecycle management policies including termination policies, pre-start scripts, and post-start hooks. Structure:
image_tag: 2026.06.16 env:
  • name: ENV value: test
Example:

resume

Resumes a stopped workspace, restarting the cloud instance.Supported cluster types: K8S, DockerRequired parameters:
  • workspace.action: "resume"
Optional parameters: NoneRequest body:
Example:

patch

Applies partial updates to the workspace configuration, such as updating environment variables, container settings, or lifecycle configurations.Supported cluster types: K8S, DockerRequired parameters:
  • workspace.action: "patch"
Optional parameters:
  • workspace.container_config (string) - YAML configuration string for the container
  • workspace.lifecycle_config (object) - Dictionary containing lifecycle configuration (termination policy, pre-start scripts, post-start hooks)
  • workspace.update_workspace_settings (boolean) - Whether to sync workspace settings with cluster-level environment variables
Request body:
Example:

add_to_ingress

Adds the workspace service to the Kubernetes ingress configuration, making it accessible via the ingress URL.Supported cluster types: Kubernetes (K8S) onlyRequired parameters:
  • workspace.action: "add_to_ingress"
Optional parameters: NoneRequest body:
Example:
Optional. Whether to update workspace settings with the current cluster’s environment variables.
Set to true to sync the workspace configuration with the cluster-level environment.