# Workspaces

## Create

`$ boltz-api admin:workspaces create`

**post** `/compute/v1/admin/workspaces`

Create a workspace

### Parameters

- `--data-retention: optional object { unit, value }`

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

- `--name: optional string`

  Workspace name

### Returns

- `AdminWorkspaceNewResponse: object { id, archived_at, created_at, 4 more }`

  - `id: string`

    Workspace ID

  - `archived_at: string`

  - `created_at: string`

  - `data_retention: object { unit, value }`

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

    - `unit: "hours" or "days"`

      Time unit for retention duration

      - `"hours"`

      - `"days"`

    - `value: number`

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

  - `is_default: boolean`

    Whether this is the default workspace

  - `name: string`

    Workspace name

  - `updated_at: string`

### Example

```cli
boltz-api admin:workspaces create
```

## List

`$ boltz-api admin:workspaces list`

**get** `/compute/v1/admin/workspaces`

List workspaces

### Parameters

- `--after-id: optional string`

  Return results after this ID

- `--before-id: optional string`

  Return results before this ID

- `--limit: optional number`

  Max items to return

### Returns

- `ListWorkspacesResponse: object { data, first_id, has_more, last_id }`

  - `data: array of object { id, archived_at, created_at, 4 more }`

    - `id: string`

      Workspace ID

    - `archived_at: string`

    - `created_at: string`

    - `data_retention: object { unit, value }`

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

      - `unit: "hours" or "days"`

        Time unit for retention duration

        - `"hours"`

        - `"days"`

      - `value: number`

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

    - `is_default: boolean`

      Whether this is the default workspace

    - `name: string`

      Workspace name

    - `updated_at: string`

  - `first_id: string`

    ID of the first item. Use as before_id for the previous page.

  - `has_more: boolean`

  - `last_id: string`

    ID of the last item. Use as after_id for the next page.

### Example

```cli
boltz-api admin:workspaces list
```

## Retrieve

`$ boltz-api admin:workspaces retrieve`

**get** `/compute/v1/admin/workspaces/{workspace_id}`

Get a workspace

### Parameters

- `--workspace-id: string`

### Returns

- `AdminWorkspaceGetResponse: object { id, archived_at, created_at, 4 more }`

  - `id: string`

    Workspace ID

  - `archived_at: string`

  - `created_at: string`

  - `data_retention: object { unit, value }`

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

    - `unit: "hours" or "days"`

      Time unit for retention duration

      - `"hours"`

      - `"days"`

    - `value: number`

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

  - `is_default: boolean`

    Whether this is the default workspace

  - `name: string`

    Workspace name

  - `updated_at: string`

### Example

```cli
boltz-api admin:workspaces retrieve \
  --workspace-id workspace_id
```

## Update

`$ boltz-api admin:workspaces update`

**post** `/compute/v1/admin/workspaces/{workspace_id}`

Update a workspace

### Parameters

- `--workspace-id: string`

- `--data-retention: optional object { unit, value }`

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

- `--name: optional string`

### Returns

- `AdminWorkspaceUpdateResponse: object { id, archived_at, created_at, 4 more }`

  - `id: string`

    Workspace ID

  - `archived_at: string`

  - `created_at: string`

  - `data_retention: object { unit, value }`

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

    - `unit: "hours" or "days"`

      Time unit for retention duration

      - `"hours"`

      - `"days"`

    - `value: number`

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

  - `is_default: boolean`

    Whether this is the default workspace

  - `name: string`

    Workspace name

  - `updated_at: string`

### Example

```cli
boltz-api admin:workspaces update \
  --workspace-id workspace_id
```

## Archive

`$ boltz-api admin:workspaces archive`

**post** `/compute/v1/admin/workspaces/{workspace_id}/archive`

Archives a workspace and deactivates all its API keys. This action is irreversible.

### Parameters

- `--workspace-id: string`

### Returns

- `AdminWorkspaceArchiveResponse: object { id, archived_at, created_at, 4 more }`

  - `id: string`

    Workspace ID

  - `archived_at: string`

  - `created_at: string`

  - `data_retention: object { unit, value }`

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

    - `unit: "hours" or "days"`

      Time unit for retention duration

      - `"hours"`

      - `"days"`

    - `value: number`

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

  - `is_default: boolean`

    Whether this is the default workspace

  - `name: string`

    Workspace name

  - `updated_at: string`

### Example

```cli
boltz-api admin:workspaces archive \
  --workspace-id workspace_id
```
