# List workspace variables

Source: https://www.jawsdeploy.net/rest-api/workspace-variables-list | Section: Workspace Variables

List the variables defined at the workspace level.

`GET /api/workspace-variable`

Returns every workspace-level variable with its values and scope filters. Use the `/api/project/workspace-variable` endpoints to import these into projects.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `workspaceId` | query | string | yes | ID of the workspace. |

## Errors

| Status | Meaning |
|---|---|
| 400 | Invalid `workspaceId`. |
| 401 | Missing or invalid Basic auth credentials, or the service account lacks the required role. |

Example request:

```
GET /api/workspace-variable?workspaceId=ws_abc
```

Example response:

```
{ "workspaceId": "ws_abc", "variables": [ { "variableId": "wv_1", "name": "ConnectionString", "variableType": "Secret", "values": [ { "variableValueId": "wvv_1", "theValue": "...", "environmentsFilter": ["env_prod"] } ] } ] }
```

