This API is available on self-hosted deployments only. See Self-Hosting for setup instructions.
How This Helps
Workspaces organize users and datasets within an organization. Use these endpoints to list workspaces, view membership, check access levels, and change member roles — all programmatically.
Prerequisites
- A self-hosted Visual Layer deployment with authentication enabled.
- An authenticated session with a workspace member account.
- Admin role required for role-change operations.
List Workspaces
Retrieve all workspaces the authenticated user belongs to.Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | UUID | No | Filter workspaces by organization. |
Example
Response
Workspace Object Fields
| Field | Type | Description |
|---|---|---|
id | UUID | Workspace identifier. |
organization_id | UUID | Parent organization ID. |
name | string | Workspace display name. |
created_at | datetime | ISO 8601 creation timestamp. |
updated_at | datetime or null | Last update timestamp. |
permissions | object or null | Authenticated user’s permissions in this workspace. |
Permission Fields
| Field | Description |
|---|---|
can_view | User can view workspace contents. |
can_manage_members | User can add/remove members and change roles (Admin only). |
can_edit_roles | User can modify member roles (Admin only). |
can_create_dataset | User can create new datasets in this workspace. |
Get Workspace
Retrieve details for a specific workspace.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | UUID | Yes | Workspace ID. |
Example
Response
Returns a single Workspace object.List Workspace Members
Retrieve all members of a workspace with their roles.Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | UUID | No | Workspace ID. Defaults to the user’s primary workspace. |
Example
Response
Member Object Fields
| Field | Type | Description |
|---|---|---|
user_id | UUID | Visual Layer user ID. |
username | string | Login username. |
email | string or null | User email address. |
firstName | string or null | First name. |
lastName | string or null | Last name. |
role | string | Workspace role: admin, editor, or viewer. |
created_at | datetime | ISO 8601 timestamp of when the user joined the workspace. |
Update Member Role
Change a workspace member’s role. Admin access required.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
member_user_id | UUID | Yes | User ID of the member to update. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
role | string | Yes | New role: admin, editor, or viewer. |
workspace_id | UUID | No | Workspace ID. Defaults to the user’s primary workspace. |
Example
Response
Returns the updated Member object.Role Change Behavior
Role changes have cascading effects depending on the transition: Promoting to Admin (single-workspace mode):- All existing admins are demoted to Editor.
- The promoted user receives Keycloak admin roles.
- All affected users are logged out and must re-authenticate.
- All dataset-level permissions above Viewer are revoked.
- Datasets owned by the demoted user are transferred to the admin performing the change.
- If the user was an admin, Keycloak admin roles are revoked.
You cannot change your own role. Attempting to do so returns a
400 error.Check Settings Access
Check the authenticated user’s access level for workspace settings.Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | UUID | No | Workspace ID. Defaults to the user’s primary workspace. |
Example
Response
| Field | Description |
|---|---|
can_access | true if the user is a member of the workspace. |
can_manage | true if the user can manage members and settings (Admin only). |
role | User’s role in the workspace: admin, editor, viewer, or null. |
List Organizations
Retrieve all organizations the authenticated user belongs to.Example
Response
Get Organization
Retrieve details for a specific organization.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id | UUID | Yes | Organization ID. |
Example
Response
Python Example
Response Codes
See Error Handling for the error response format.| HTTP Code | Meaning |
|---|---|
| 200 | Request successful. |
| 400 | Validation error or self-role-change attempt. |
| 403 | Forbidden — user management not enabled, or insufficient permissions. |
| 404 | Workspace, organization, or member not found. |
| 500 | Internal Server Error — contact support if this persists. |
Related Resources
User Management
Create, update, and delete user accounts on self-hosted deployments.
Admin Settings
View and update runtime configuration settings.