# List workspace assignments for a workspace

Launch stage: GA

`GET /api/2.0/identity/workspace-assignments`

Lists the principals assigned directly to this workspace. The response leaves `entitlements`
 and `effective_entitlements` empty. To read a principal's entitlements, get its assignment.

API scopes: identity

## Query parameters

- `page_size` (int32, optional)
  The maximum number of assignments to return, up to 1000. The default is 1000. A page can
   contain fewer assignments.
- `page_token` (string, optional)
  The `next_page_token` from a previous response, to get the next page.
- `parent` (string, optional)
  The resource name of the workspace, in the format
   `accounts/{account_id}/workspaces/{workspace_id}`. Defaults to this workspace. Any other
   workspace is rejected.

## Returns

Returns a list of WorkspaceAssignment objects.

## Response

```json
{
  "workspace_assignments": [
    {
      "name": "string",
      "parent": "string",
      "principal_type": "USER",
      "principal_id": 0,
      "workspace_id": 0,
      "account_id": "string",
      "entitlements": [
        "WORKSPACE_ACCESS"
      ],
      "effective_entitlements": [
        "WORKSPACE_ACCESS"
      ]
    }
  ],
  "next_page_token": "string"
}
```

