Workspaces API
Workspaces represent virtual environments that users can launch and access. Each workspace can be a Linux desktop, Windows RDP session, web application, or secure browser.Workspace Model
Unique workspace identifier (e.g., “ws-sap-neogenesys”)
Display name of the workspace
Workspace type:
"html5", "rdp", "web", "linux", "browser", "windows", "dev", "admin"Detailed description of the workspace and its purpose
Thumbnail image URL for the workspace
Current status:
"available", "running", "stopped", "error"CPU allocation (e.g., “2 vCPU”, “4 vCPU”)
Memory allocation (e.g., “4 GB”, “8 GB”)
Storage allocation (e.g., “50 GB”, “100 GB”)
Connection URL for the workspace (if applicable)
Connection method:
"html5", "web", "vnc", "browser"Whether NetBird VPN connection is required
Icon identifier for UI display
List Workspaces
Retrieve all available workspaces for the authenticated user.Response
Default Workspaces
If no workspaces exist in the database, the API automatically initializes 5 default workspaces:- SAP Neogénesys (HTML5) - TSPlus Desktop for SAP access
- Remote Desktop (RDP) - Windows remote desktop
- 1Panel Admin (Web) - Infrastructure admin panel
- Linux Desktop (Linux) - Ubuntu 22.04 LTS desktop
- Secure Browser (Browser) - Isolated browser environment
Create Workspace
Create a new workspace. Requires admin privileges.Request Body
Workspace display name
Workspace type (e.g., “linux”, “windows”, “browser”, “dev”, “admin”)
Detailed description of the workspace
Connection URL (defaults to empty string)
Connection method: “web”, “html5”, “vnc”, “browser” (defaults to “web”)
Whether NetBird VPN is required (defaults to true)
CPU allocation (defaults to “2 vCPU”)
Memory allocation (defaults to “4 GB”)
Storage allocation (defaults to “50 GB”)
Thumbnail image URL (defaults to empty string)
Icon identifier (defaults to “default”)
Response
Error Responses
Update Workspace
Update workspace configuration. Requires admin privileges.Request Body
All fields are optional. Only provided fields will be updated.Updated workspace name
Updated description
Updated connection URL
Updated connection type
Updated NetBird requirement
Updated CPU allocation
Updated memory allocation
Updated storage allocation
Updated image URL
Updated icon identifier
Updated status (“available”, “running”, “stopped”, “error”)
Response
Error Responses
Admin access required
Delete Workspace
Delete a workspace. Requires admin privileges.Response
Error Responses
Admin access required
Workspace not found
Launch Workspace
Launch a workspace and create a new session.Response
Automatic Actions
When a workspace is launched:- New session is created with user info
- Workspace status is updated to
"running" - Audit log entry is created:
"launch_workspace"action - Security features are enforced
Error Responses
Stop Workspace
Stop a running workspace and terminate the session.Response
Automatic Actions
When a workspace is stopped:- Active session is marked as
"terminated" - Session
ended_attimestamp is set - Workspace status is updated to
"available" - Audit log entry is created:
"stop_workspace"action
Reset Workspaces
Reset all workspaces to default configuration. Requires admin privileges.Response
Automatic Actions
- All existing workspaces are deleted
- 5 default workspaces are recreated
- Audit log entry is created:
"reset_workspaces"action
Error Responses
Admin access required
Workspace Types
| Type | Description | Example Use Case |
|---|---|---|
html5 | HTML5-based desktop | TSPlus remote desktop |
rdp | Remote Desktop Protocol | Windows servers |
web | Web application | Admin panels, dashboards |
linux | Linux desktop environment | Ubuntu desktop |
browser | Isolated browser | Secure web browsing |
windows | Windows environment | Windows applications |
dev | Development environment | Code editors, IDEs |
admin | Administrative tools | System management |
Connection Types
| Type | Description | Protocol |
|---|---|---|
html5 | Browser-based HTML5 | HTTP/WebSockets |
web | Direct web access | HTTP/HTTPS |
vnc | VNC remote desktop | VNC over WebSockets |
browser | Isolated browser session | Custom protocol |
Security Features
All workspace launches enforce:- Encrypted Tunnel: WireGuard VPN via NetBird
- Identity Verification: JWT token validation
- MFA Enforcement: Based on user settings
- Session Recording: All activity logged
- No Open Ports: Zero-trust network model