API Reference
API Reference
Complete reference for every Workspace API endpoint. Each page shows both SDK and REST API syntax side by side.
Base URL
https://api.oblien.comAuthentication
All requests require one of:
| Method | Headers | Use case |
|---|---|---|
| API Key | X-Client-ID + X-Client-Secret | Server-side / SDK |
| Workspace Token | Authorization: Bearer <token> | Client-side / scoped access |
See Authentication for setup details.
Response format
Every response follows a consistent structure:
Success:
{
"success": true,
"workspace": { ... }
}Error:
{
"success": false,
"error": "Human-readable error message"
}Some endpoints return additional top-level fields (e.g., total, page, limit for paginated results).
Common HTTP status codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created (new resource) |
400 | Bad request - invalid parameters |
401 | Unauthorized - missing or invalid credentials |
402 | Payment required - quota exceeded |
403 | Forbidden - not your resource |
404 | Not found |
409 | Conflict - resource in wrong state |
422 | Unprocessable - validation failed |
429 | Rate limited - slow down |
500 | Server error |
503 | Service unavailable - VM backend down |
Endpoint map
Core
| Endpoint | Method | Description |
|---|---|---|
/workspace | POST | Create workspace |
/workspace | GET | List workspaces |
/workspace/:id | GET | Get workspace |
/workspace/:id | PUT | Update workspace |
/workspace/:id | DELETE | Delete workspace |
/workspace/:id/details | GET | Aggregated details |
/workspace/quota | GET | Resource quota |
Lifecycle & Power
| Endpoint | Method | Description |
|---|---|---|
/workspace/:id/start | POST | Start workspace |
/workspace/:id/stop | POST | Stop workspace |
/workspace/:id/restart | POST | Restart workspace |
/workspace/:id/pause | POST | Pause workspace |
/workspace/:id/resume | POST | Resume workspace |
/workspace/:id/lifecycle | GET | Get lifecycle status |
/workspace/:id/lifecycle/permanent | POST | Make permanent |
/workspace/:id/lifecycle/temporary | POST | Make temporary |
/workspace/:id/lifecycle/ttl | PUT | Update TTL |
/workspace/:id/ping | POST | Keep-alive (renew TTL) |
Workspace Runtime
Command execution, terminal sessions, file operations, search, and file watchers run inside the workspace VM on a separate API surface. See the Workspace Internal API docs for the full endpoint reference.
The Internal API uses
workspace.oblien.com(gateway) or10.x.x.x:9990(direct) - notapi.oblien.com.
Network
| Endpoint | Method | Description |
|---|---|---|
/workspace/:id/network | GET | Get network config |
/workspace/:id/network | PATCH | Update network (firewall + private links) |
/workspace/:id/network | PUT | Replace network |
/workspace/:id/network/ip | POST | Apply outbound IP |
SSH
| Endpoint | Method | Description |
|---|---|---|
/workspace/:id/ssh | GET | SSH status |
/workspace/:id/ssh/enable | POST | Enable SSH |
/workspace/:id/ssh/disable | POST | Disable SSH |
/workspace/:id/ssh/password | POST | Set password |
/workspace/:id/ssh/key | POST | Set authorized key |
Public Access
| Endpoint | Method | Description |
|---|---|---|
/workspace/:id/public-access | GET | List exposed ports |
/workspace/:id/public-access | POST | Expose a port |
/workspace/:id/public-access/:port | DELETE | Revoke a port |
Filesystem
| Endpoint | Method | Description |
|---|---|---|
/workspace/:id/overlay | GET | List files |
/workspace/:id/overlay/files | GET | Read file |
/workspace/:id/overlay/files | POST | Write file |
/workspace/:id/overlay/usage | GET | Disk usage |
/workspace/:id/overlay/resize | PUT | Resize disk |
/workspace/:id/overlay/sync | POST | Sync overlay |
Resources
| Endpoint | Method | Description |
|---|---|---|
/workspace/:id/resources | GET | Get resources |
/workspace/:id/resources | PUT | Update resources |
Snapshots & Archives
| Endpoint | Method | Description |
|---|---|---|
/workspace/:id/snapshot | POST | Create snapshot |
/workspace/:id/restore | POST | Restore snapshot |
/workspace/:id/archives | POST | Create archive |
/workspace/:id/archives | GET | List archives |
/workspace/:id/archives/:version | GET | Get archive |
/workspace/:id/archives/:version | DELETE | Delete archive |
/workspace/:id/archives | DELETE | Delete all archives |
Workloads
| Endpoint | Method | Description |
|---|---|---|
/workspace/:id/workloads | POST | Create workload |
/workspace/:id/workloads | GET | List workloads |
/workspace/:id/workloads/:wid | GET | Get workload |
/workspace/:id/workloads/:wid | PUT | Update workload |
/workspace/:id/workloads/:wid | DELETE | Delete workload |
/workspace/:id/workloads | DELETE | Delete all |
/workspace/:id/workloads/:wid/start | POST | Start workload |
/workspace/:id/workloads/:wid/stop | POST | Stop workload |
/workspace/:id/workloads/:wid/status | GET | Workload status |
/workspace/:id/workloads/:wid/logs | GET | Workload logs |
/workspace/:id/workloads/:wid/logs/stream | GET | Stream logs (SSE) |
Monitoring
| Endpoint | Method | Description |
|---|---|---|
/workspace/:id/stats | GET | Current stats |
/workspace/:id/stats/stream | GET | Stream stats (SSE) |
/workspace/:id/info | GET | VM info |
/workspace/:id/config | GET | VM config |
/workspace/usage | GET | Global usage |
/workspace/activity | GET | Activity history |
/workspace/:id/usage | GET | Workspace usage |
/workspace/:id/usage/totals | GET | Usage totals |
/workspace/:id/usage/credits/chart | GET | Credits chart |
Other
| Endpoint | Method | Description |
|---|---|---|
/workspace/:id/metadata | GET | Get metadata |
/workspace/:id/metadata | PUT | Update metadata |
/workspace/:id/api-access/token | POST | Rotate token |
/workspace/:id/api-access/enable | POST | Enable server |
/workspace/:id/api-access/disable | POST | Disable server |
/workspace/:id/logs | GET | Get logs |
/workspace/:id/logs | DELETE | Clear logs |
/workspace/:id/logs/stream/boot | GET | Stream boot logs |
/workspace/:id/logs/stream/cmd | GET | Stream cmd logs |
/workspace/images | GET | Image catalog |