Mage Pro API
Update Workspace
Update the configuration of an existing workspace in your Mage Pro cluster.
PUT /api/workspaces/{workspace_name}
Path Parameters
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 theworkspace object.
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.Optional. YAML configuration string for the container. Used with the
Allows you to update container-level settings such as environment variables, resource limits, and other container configurations. For example, updating environment variables:
patch action.Allows you to update container-level settings such as environment variables, resource limits, and other container configurations. For example, updating environment variables:
Optional. Dictionary/object containing lifecycle configuration. Used with the image_tag: 2026.06.16
env:Example:
Resumes a stopped workspace, restarting the cloud instance.Supported cluster types: K8S, DockerRequired parameters:Example:
Applies partial updates to the workspace configuration, such as updating environment variables, container settings, or lifecycle configurations.Supported cluster types: K8S, DockerRequired parameters:Example:
Adds the workspace service to the Kubernetes ingress configuration, making it accessible via the ingress URL.Supported cluster types: Kubernetes (K8S) onlyRequired parameters:Example:Optional. Whether to update workspace settings with the current cluster’s environment variables.
Set to
patch action.
Defines lifecycle management policies including termination policies, pre-start scripts, and post-start hooks.
Structure:- name: ENV value: test
resume
Resumes a stopped workspace, restarting the cloud instance.Supported cluster types: K8S, DockerRequired parameters:workspace.action:"resume"
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"
workspace.container_config(string) - YAML configuration string for the containerworkspace.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
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"
Set to
true to sync the workspace configuration with the cluster-level environment.