Workspaces
A workspace is the container every other resource belongs to.
Workspaces are owned by the Organization service and are reached directly under /api/v1.
Base path: https://api.rabbitqa.com/api/v1/workspaces
List workspaces
curl https://api.rabbitqa.com/api/v1/workspaces \
-H "Authorization: Bearer $TOKEN"
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/workspaces | All workspaces in the company |
GET | /api/v1/workspaces/accessible | Only the workspaces the signed-in user can enter |
GET | /api/v1/workspaces/recent | Recently visited workspaces |
GET | /api/v1/workspaces/{id} | A single workspace |
GET | /api/v1/workspaces/validation-rules | Naming and configuration rules applied on create |
Use /accessible when building a workspace picker — it is the list that will not produce a 403 on the next call.
Create and update
| Method | Path | Purpose |
|---|---|---|
POST | /api/v1/workspaces | Create a workspace |
PUT | /api/v1/workspaces/{id} | Update name and settings |
PUT | /api/v1/workspaces/{id}/archive | Archive |
PUT | /api/v1/workspaces/{id}/unarchive | Restore an archived workspace |
DELETE | /api/v1/workspaces/{id} | Delete |
POST | /api/v1/workspaces/{id}/touch | Mark as recently visited |
Switching workspace
curl -X POST https://api.rabbitqa.com/api/v1/workspaces/91/switch \
-H "Authorization: Bearer $TOKEN"
POST /api/v1/auth/switch-workspace/{workspaceId} re-issues the access token with the new workspace baked in.
For most API clients it is simpler to keep one token and vary the X-Workspace-Id header per request.
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/workspaces/{id}/has-access | Whether the current user can enter the workspace |
GET | /api/v1/workspaces/{id}/my-roles | The current user's roles in that workspace |
Module entitlement
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/workspaces/{id}/modules | Modules enabled for the workspace |
PUT | /api/v1/workspaces/{id}/modules | Change the enabled modules |
The gateway checks this entitlement before forwarding a request to a module's prefix, so a workspace without the AutoRunner module cannot call /autorunner/api/v1/** regardless of the caller's permissions.
Access control
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/workspaces/{id}/access | Current team and user grants |
POST | /api/v1/workspaces/{id}/access/teams | Grant a team access |
DELETE | /api/v1/workspaces/{id}/access/teams/{teamId} | Revoke a team |
POST | /api/v1/workspaces/{id}/access/users | Grant a user access |
DELETE | /api/v1/workspaces/{id}/access/users/{userId} | Revoke a user |
GET | /api/v1/workspaces/{id}/members | Members and their roles |
POST | /api/v1/workspaces/{id}/members/roles | Assign roles to a member |
DELETE | /api/v1/workspaces/{id}/members/{userId}/roles/{roleId} | Remove one role from a member |
Related resources
Teams and roles are managed alongside workspaces:
GET|POST /api/v1/teams,GET|PUT|DELETE /api/v1/teams/{id},POST|DELETE /api/v1/teams/{id}/members/{userId}GET|POST /api/v1/roles,GET|PUT|DELETE /api/v1/roles/{id},GET /api/v1/roles/{id}/usersGET /api/v1/permissions,GET /api/v1/permissions/modules