---
title: "Update a workspace"
component: "savanna"
version: "main"
module: "rest-api"
html_url: "/savanna/main/rest-api/endpoints/update-a-workspace"
---

[View as HTML](/savanna/main/rest-api/endpoints/update-a-workspace)

# Update a workspace

Updates a workspace configuration.

PUT `/controller/v4/v2/workgroups/{workgroupID}/workspaces/{workspaceID}` 

## Authorizations

`x-api-key` string header required 

Authorization for TigerGraph Savanna. Send the key in the `x-api-key` request header.

[Create an API key](../create-api-key.md) 

## Path parameters

[#](#parameter-workgroup-id) `workgroupID` string path required 

Workgroup ID

[#](#parameter-workspace-id) `workspaceID` string path required 

Workspace ID

## Body

[#](#body-addons) `addons` object\[\] 

Add-ons to enable on the workspace.

Show child attributes Hide child attributes 

`addons_id`stringrequired

Unique identifier of the add-on.

`enable`booleanrequired

Whether the add-on is enabled.

`enable_configuration`object

Configuration applied when the add-on is enabled.

`is_free`boolean

Whether the add-on is available at no cost.

`unique_name`string

Unique name of the add-on.

`workspace_id`string

Unique identifier of the workspace.

[#](#body-agent-config) `agent_config` object 

Agent heartbeat and polling configuration.

Show child attributes Hide child attributes 

`catalog_activity_update_interval_seconds`integer

Seconds between catalog activity updates.

`enable_topology_force_update`boolean

Whether topology updates are forced.

`heartbeat_interval_seconds`integer

Seconds between agent heartbeats.

`query_activity_update_interval_seconds`integer

Seconds between query activity updates.

`topology_update_interval_seconds`integer

Seconds between topology updates.

[#](#body-auto-stop-minutes) `auto_stop_minutes` integer 

Idle minutes before the workspace stops automatically.

Minimum: `0`

[#](#body-auto-upgrade-state) `auto_upgrade_state` string 

State of the automatic version upgrade.

[#](#body-desired-tg-version) `desired_tg_version` string 

TigerGraph version to move the workspace to.

[#](#body-enable-auto-start) `enable_auto_start` boolean 

Whether the workspace starts automatically on access.

[#](#body-enable-ha) `enable_ha` boolean 

Whether high availability is enabled.

[#](#body-maintenance-window-day-of-week) `maintenance_window_day_of_week` integer 

Day of the week the maintenance window starts.

[#](#body-maintenance-window-hour-of-day) `maintenance_window_hour_of_day` integer 

Hour of the day the maintenance window starts.

[#](#body-maintenance-window-interval-weeks) `maintenance_window_interval_weeks` integer 

Number of weeks between maintenance windows.

[#](#body-maintenance-window-time-zone) `maintenance_window_time_zone` string 

Time zone used for the maintenance window.

[#](#body-pause) `pause` boolean 

Whether the workspace is paused.

[#](#body-update-strategy) `update_strategy` string 

Strategy used to apply workspace updates.

[#](#body-workspace-name) `workspace_name` string 

New name for the workspace.

[#](#body-workspace-type-name) `workspace_type_name` string 

Name of the workspace size to apply.

## Response

200 application/json 

[#](#response-error) `Error` boolean 

Indicates whether the request returned an error.

[#](#response-error-details) `ErrorDetails` object\[\] 

Details about each error returned by the request.

Show child attributes Hide child attributes 

`FieldName`string

Field associated with the error.

`Reason`string

Explanation of why the error occurred.

`Type`string

Category of the error.

Available options: `Internal-Error`, `Bad-Request`, `Not-Found`, `Forbidden`, `Unauthorized`, `API-Disabled`, `Quota-Exceed`, `Unknown`

[#](#response-message) `Message` string 

Human-readable summary of the request result.

[#](#response-request-id) `RequestID` string 

Unique identifier for tracing the request.

[#](#response-result) `Result` object 

Payload returned by the request.

Show child attributes Hide child attributes 

`addons`object\[\]

Add-ons enabled for the workspace.

Show child attributes Hide child attributes 

`addons_id`stringrequired

Unique identifier of the add-on.

`enable`booleanrequired

Whether the add-on is enabled.

`enable_configuration`object

Configuration applied when the add-on is enabled.

`is_free`boolean

Whether the add-on is available at no cost.

`unique_name`string

Unique name of the add-on.

`workspace_id`string

Unique identifier of the workspace.

`agent_config`object

Agent heartbeat and polling configuration.

Show child attributes Hide child attributes 

`catalog_activity_update_interval_seconds`integer

Seconds between catalog activity updates.

`enable_topology_force_update`boolean

Whether topology updates are forced.

`heartbeat_interval_seconds`integer

Seconds between agent heartbeats.

`query_activity_update_interval_seconds`integer

Seconds between query activity updates.

`topology_update_interval_seconds`integer

Seconds between topology updates.

`auto_stop_minutes`integer

Idle minutes before the workspace stops automatically.

`auto_upgrade_state`string

State of the automatic version upgrade.

`cloud_provider_id`string

Unique identifier of the cloud provider configuration.

`cloud_provider_name`string

Display name of the cloud provider.

`cloud_provider_short_id`string

Short identifier of the cloud provider configuration.

`condition_type`string

Current condition reported for the workspace.

`created_at`string

Time the workspace was created.

`creator`string

User who created the workspace.

`database_id`string

Unique identifier of the attached database.

`database_name`string

Name of the attached database.

`deleted_at`string

Time the workspace was deleted.

`desired_tg_version`string

TigerGraph version the workspace is moving to.

`display_status`string

Status shown in the TigerGraph Savanna console.

`edge_count`integer

Number of edges stored in the workspace.

`enable_auto_start`boolean

Whether the workspace starts automatically on access.

`enable_copilot`boolean

Whether TigerGraph CoPilot is enabled.

`enable_ha`boolean

Whether high availability is enabled.

`err_message`string

Error message reported for the workspace.

`folder_statistics`object

Storage statistics for the workspace.

Show child attributes Hide child attributes 

`backup_size`integer

Size of backup data, in bytes.

`billed_size`integer

Storage size counted for billing, in bytes.

`log_size`integer

Size of log data, in bytes.

`milvus_size`integer

Size of vector index data, in bytes.

`total_size`integer

Total storage size, in bytes.

`workspaces`object\[\]

Storage used by each workspace.

Show child attributes Hide child attributes 

`size`integer

Storage used by the workspace, in bytes.

`workspace_id`string

Unique identifier of the workspace.

`graph_topology_size_bytes`integer

Size of the graph topology, in bytes.

`is_rw`boolean

Whether the workspace accepts writes.

`last_maintenance`string

Time of the last maintenance run.

`last_modified_time`string

Time the workspace was last modified.

`maintenance_window_day_of_week`integer

Day of the week the maintenance window starts.

`maintenance_window_hour_of_day`integer

Hour of the day the maintenance window starts.

`maintenance_window_interval_weeks`integer

Number of weeks between maintenance windows.

`maintenance_window_time_zone`string

Time zone used for the maintenance window.

`name`string

Name of the workspace.

`nginx_host`string

Host name that serves the workspace endpoint.

`org_id`string

Unique identifier of the organization.

`org_name`string

Name of the organization.

`refresh_message`string

Message describing the most recent refresh.

`refresh_status`string

Status of the most recent refresh.

`region`string

Cloud region that hosts the workspace.

`replicas`integer

Number of replicas provisioned for the workspace.

`snapshot_time`string

Time of the snapshot the workspace was created from.

`solution_catalog_id`string

Unique identifier of the solution catalog entry.

`status`string

Current status of the workspace.

`tg_version`string

TigerGraph version running in the workspace.

`update_strategy`string

Strategy used to apply workspace updates.

`version_number`integer

Internal version number of the workspace record.

`vertex_count`integer

Number of vertices stored in the workspace.

`workgroup_id`string

Unique identifier of the parent workgroup.

`workgroup_name`string

Name of the parent workgroup.

`workspace_id`string

Unique identifier of the workspace.

`workspace_type`object

Compute size and shape of the workspace.

Show child attributes Hide child attributes 

`cpu`string

Number of vCPUs allocated to the workspace.

`ha`integer

Number of high-availability replicas.

`memory`string

Memory allocated to the workspace.

`partition`integer

Number of partitions in the workspace.

`typeName`string

Name of the workspace size type.

Update a workspace 

cURL 

cURL Python JavaScript PHP Go Java Ruby 

```bash
curl --request PUT \
  --url 'https://api.tgcloud.io/controller/v4/v2/workgroups/{workgroupID}/workspaces/{workspaceID}' \
  --header 'x-api-key: <your-api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "addons": [],
    "agent_config": {
      "catalog_activity_update_interval_seconds": 0,
      "enable_topology_force_update": false,
      "heartbeat_interval_seconds": 0,
      "query_activity_update_interval_seconds": 0,
      "topology_update_interval_seconds": 0
    },
    "auto_stop_minutes": 0,
    "auto_upgrade_state": "<string>",
    "desired_tg_version": "<string>",
    "enable_auto_start": false,
    "enable_ha": false,
    "maintenance_window_day_of_week": 0,
    "maintenance_window_hour_of_day": 0,
    "maintenance_window_interval_weeks": 0,
    "maintenance_window_time_zone": "<string>",
    "pause": false,
    "update_strategy": "<string>",
    "workspace_name": "<string>",
    "workspace_type_name": "<string>"
  }'
```

```python
import requests

url = "https://api.tgcloud.io/controller/v4/v2/workgroups/{workgroupID}/workspaces/{workspaceID}"
headers = {"x-api-key": "<your-api-key>"}
payload = {
  "addons": [],
  "agent_config": {
    "catalog_activity_update_interval_seconds": 0,
    "enable_topology_force_update": False,
    "heartbeat_interval_seconds": 0,
    "query_activity_update_interval_seconds": 0,
    "topology_update_interval_seconds": 0
  },
  "auto_stop_minutes": 0,
  "auto_upgrade_state": "<string>",
  "desired_tg_version": "<string>",
  "enable_auto_start": False,
  "enable_ha": False,
  "maintenance_window_day_of_week": 0,
  "maintenance_window_hour_of_day": 0,
  "maintenance_window_interval_weeks": 0,
  "maintenance_window_time_zone": "<string>",
  "pause": False,
  "update_strategy": "<string>",
  "workspace_name": "<string>",
  "workspace_type_name": "<string>"
}

response = requests.put(url, headers=headers, json=payload)
print(response.json())
```

```javascript
const response = await fetch(
  "https://api.tgcloud.io/controller/v4/v2/workgroups/{workgroupID}/workspaces/{workspaceID}",
  {
    method: "PUT",
    headers: { "x-api-key": "<your-api-key>", "Content-Type": "application/json" },
    body: JSON.stringify({
      "addons": [],
      "agent_config": {
        "catalog_activity_update_interval_seconds": 0,
        "enable_topology_force_update": false,
        "heartbeat_interval_seconds": 0,
        "query_activity_update_interval_seconds": 0,
        "topology_update_interval_seconds": 0
      },
      "auto_stop_minutes": 0,
      "auto_upgrade_state": "<string>",
      "desired_tg_version": "<string>",
      "enable_auto_start": false,
      "enable_ha": false,
      "maintenance_window_day_of_week": 0,
      "maintenance_window_hour_of_day": 0,
      "maintenance_window_interval_weeks": 0,
      "maintenance_window_time_zone": "<string>",
      "pause": false,
      "update_strategy": "<string>",
      "workspace_name": "<string>",
      "workspace_type_name": "<string>"
    }),
  }
)
console.log(await response.json())
```

```php
<?php
$request = curl_init(
  "https://api.tgcloud.io/controller/v4/v2/workgroups/{workgroupID}/workspaces/{workspaceID}"
);
curl_setopt($request, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($request, CURLOPT_HTTPHEADER, [
  "x-api-key: <your-api-key>",
  "Content-Type: application/json"
]);
curl_setopt($request, CURLOPT_POSTFIELDS, '{
    "addons": [],
    "agent_config": {
      "catalog_activity_update_interval_seconds": 0,
      "enable_topology_force_update": false,
      "heartbeat_interval_seconds": 0,
      "query_activity_update_interval_seconds": 0,
      "topology_update_interval_seconds": 0
    },
    "auto_stop_minutes": 0,
    "auto_upgrade_state": "<string>",
    "desired_tg_version": "<string>",
    "enable_auto_start": false,
    "enable_ha": false,
    "maintenance_window_day_of_week": 0,
    "maintenance_window_hour_of_day": 0,
    "maintenance_window_interval_weeks": 0,
    "maintenance_window_time_zone": "<string>",
    "pause": false,
    "update_strategy": "<string>",
    "workspace_name": "<string>",
    "workspace_type_name": "<string>"
  }');
curl_exec($request);
```

```go
payload := strings.NewReader(`{
    "addons": [],
    "agent_config": {
      "catalog_activity_update_interval_seconds": 0,
      "enable_topology_force_update": false,
      "heartbeat_interval_seconds": 0,
      "query_activity_update_interval_seconds": 0,
      "topology_update_interval_seconds": 0
    },
    "auto_stop_minutes": 0,
    "auto_upgrade_state": "<string>",
    "desired_tg_version": "<string>",
    "enable_auto_start": false,
    "enable_ha": false,
    "maintenance_window_day_of_week": 0,
    "maintenance_window_hour_of_day": 0,
    "maintenance_window_interval_weeks": 0,
    "maintenance_window_time_zone": "<string>",
    "pause": false,
    "update_strategy": "<string>",
    "workspace_name": "<string>",
    "workspace_type_name": "<string>"
  }`)

request, _ := http.NewRequest(
  "PUT",
  "https://api.tgcloud.io/controller/v4/v2/workgroups/{workgroupID}/workspaces/{workspaceID}",
  payload,
)
request.Header.Add("x-api-key", "<your-api-key>")
request.Header.Add("Content-Type", "application/json")
response, _ := http.DefaultClient.Do(request)
```

```java
HttpRequest request = HttpRequest.newBuilder()
  .uri(URI.create(
    "https://api.tgcloud.io/controller/v4/v2/workgroups/{workgroupID}/workspaces/{workspaceID}"
  ))
  .header("x-api-key", "<your-api-key>")
  .header("Content-Type", "application/json")
  .method("PUT", HttpRequest.BodyPublishers.ofString("""
{
      "addons": [],
      "agent_config": {
        "catalog_activity_update_interval_seconds": 0,
        "enable_topology_force_update": false,
        "heartbeat_interval_seconds": 0,
        "query_activity_update_interval_seconds": 0,
        "topology_update_interval_seconds": 0
      },
      "auto_stop_minutes": 0,
      "auto_upgrade_state": "<string>",
      "desired_tg_version": "<string>",
      "enable_auto_start": false,
      "enable_ha": false,
      "maintenance_window_day_of_week": 0,
      "maintenance_window_hour_of_day": 0,
      "maintenance_window_interval_weeks": 0,
      "maintenance_window_time_zone": "<string>",
      "pause": false,
      "update_strategy": "<string>",
      "workspace_name": "<string>",
      "workspace_type_name": "<string>"
    }
  """))
  .build();
```

```ruby
uri = URI(
  "https://api.tgcloud.io/controller/v4/v2/workgroups/{workgroupID}/workspaces/{workspaceID}"
)
request = Net::HTTP::Put.new(uri)
request["x-api-key"] = "<your-api-key>"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
    "addons": [],
    "agent_config": {
      "catalog_activity_update_interval_seconds": 0,
      "enable_topology_force_update": false,
      "heartbeat_interval_seconds": 0,
      "query_activity_update_interval_seconds": 0,
      "topology_update_interval_seconds": 0
    },
    "auto_stop_minutes": 0,
    "auto_upgrade_state": "<string>",
    "desired_tg_version": "<string>",
    "enable_auto_start": false,
    "enable_ha": false,
    "maintenance_window_day_of_week": 0,
    "maintenance_window_hour_of_day": 0,
    "maintenance_window_interval_weeks": 0,
    "maintenance_window_time_zone": "<string>",
    "pause": false,
    "update_strategy": "<string>",
    "workspace_name": "<string>",
    "workspace_type_name": "<string>"
  }
JSON
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) {
  |http| http.request(request)
}
```

200 

```json
{
  "Error": false,
  "ErrorDetails": [],
  "Message": "<string>",
  "RequestID": "<string>",
  "Result": {
    "addons": [
      {
        "addons_id": "<string>",
        "enable": false,
        "enable_configuration": "<string>",
        "is_free": false,
        "unique_name": "<string>",
        "workspace_id": "<string>"
      }
    ],
    "agent_config": {
      "catalog_activity_update_interval_seconds": 0,
      "enable_topology_force_update": false,
      "heartbeat_interval_seconds": 0,
      "query_activity_update_interval_seconds": 0,
      "topology_update_interval_seconds": 0
    },
    "auto_stop_minutes": 0,
    "auto_upgrade_state": "<string>",
    "cloud_provider_id": "<string>",
    "cloud_provider_name": "<string>",
    "cloud_provider_short_id": "<string>",
    "condition_type": "<string>",
    "created_at": "<string>",
    "creator": "<string>",
    "database_id": "<string>",
    "database_name": "<string>",
    "deleted_at": "<string>",
    "desired_tg_version": "<string>",
    "display_status": "<string>",
    "edge_count": 0,
    "enable_auto_start": false,
    "enable_copilot": false,
    "enable_ha": false,
    "err_message": "<string>",
    "folder_statistics": {
      "backup_size": 0,
      "billed_size": 0,
      "log_size": 0,
      "milvus_size": 0,
      "total_size": 0,
      "workspaces": [
        {
          "size": 0,
          "workspace_id": "<string>"
        }
      ]
    },
    "graph_topology_size_bytes": 0,
    "is_rw": false,
    "last_maintenance": "<string>",
    "last_modified_time": "<string>",
    "maintenance_window_day_of_week": 0,
    "maintenance_window_hour_of_day": 0,
    "maintenance_window_interval_weeks": 0,
    "maintenance_window_time_zone": "<string>",
    "name": "<string>",
    "nginx_host": "<string>",
    "org_id": "<string>",
    "org_name": "<string>",
    "refresh_message": "<string>",
    "refresh_status": "<string>",
    "region": "<string>",
    "replicas": 0,
    "snapshot_time": "<string>",
    "solution_catalog_id": "<string>",
    "status": "<string>",
    "tg_version": "<string>",
    "update_strategy": "<string>",
    "version_number": 0,
    "vertex_count": 0,
    "workgroup_id": "<string>",
    "workgroup_name": "<string>",
    "workspace_id": "<string>",
    "workspace_type": {
      "cpu": "<string>",
      "ha": 0,
      "memory": "<string>",
      "partition": 0,
      "typeName": "<string>"
    }
  }
}
```
