Skip to content
Go to Boltz API

Update a workspace

admin.workspaces.update(strworkspace_id, WorkspaceUpdateParams**kwargs) -> WorkspaceUpdateResponse
POST/compute/v1/admin/workspaces/{workspace_id}

Update a workspace

ParametersExpand Collapse
workspace_id: str
data_retention: Optional[DataRetention]

How long result data is retained before automatic deletion. Defaults to 7 days if not specified. Maximum retention is 14 days (336 hours).

unit: Literal["hours", "days"]

Time unit for retention duration

Accepts one of the following:
"hours"
"days"
value: int

Duration value. Maximum retention is 14 days (or 336 hours).

minimum1
name: Optional[str]
minLength1
maxLength255
ReturnsExpand Collapse
class WorkspaceUpdateResponse:
id: str

Workspace ID

archived_at: Optional[datetime]
formatdate-time
created_at: datetime
formatdate-time
data_retention: DataRetention

How long result data is retained before automatic deletion. Defaults to 7 days if not specified. Maximum retention is 14 days (336 hours).

unit: Literal["hours", "days"]

Time unit for retention duration

Accepts one of the following:
"hours"
"days"
value: int

Duration value. Maximum retention is 14 days (or 336 hours).

minimum1
is_default: bool

Whether this is the default workspace

name: Optional[str]

Workspace name

updated_at: datetime
formatdate-time

Update a workspace

import os
from boltz_api import Boltz

client = Boltz(
    api_key=os.environ.get("BOLTZ_API_KEY"),  # This is the default and can be omitted
)
workspace = client.admin.workspaces.update(
    workspace_id="workspace_id",
)
print(workspace.id)
{
  "id": "id",
  "archived_at": "2019-12-27T18:11:19.117Z",
  "created_at": "2019-12-27T18:11:19.117Z",
  "data_retention": {
    "unit": "hours",
    "value": 1
  },
  "is_default": true,
  "name": "name",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "id": "id",
  "archived_at": "2019-12-27T18:11:19.117Z",
  "created_at": "2019-12-27T18:11:19.117Z",
  "data_retention": {
    "unit": "hours",
    "value": 1
  },
  "is_default": true,
  "name": "name",
  "updated_at": "2019-12-27T18:11:19.117Z"
}