API Reference
Snapshots & Archives
Snapshots capture the entire VM state (memory + disk) for instant restore. Archives are disk-only backups that can be versioned.
Create snapshot
Take a snapshot of the current workspace state.
await ws.snapshots.create('ws_a1b2c3d4', {
after: 'resume', // What to do after snapshot
});POST /workspace/:workspaceId/snapshot{
"after": "resume"
}curl -X POST "https://api.oblien.com/workspace/ws_a1b2c3d4/snapshot" \
-H "X-Client-ID: $OBLIEN_CLIENT_ID" \
-H "X-Client-Secret: $OBLIEN_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{ "after": "resume" }'Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
after | string | No | Action after snapshot: "resume", "paused", or "stop" |
The after parameter controls the VM state post-snapshot:
"resume"- the VM continues running after the snapshot"paused"- the VM remains frozen after the snapshot"stop"- the VM is stopped after the snapshot
Restore snapshot
Restore the workspace to the last snapshot.
await ws.snapshots.restore('ws_a1b2c3d4');POST /workspace/:workspaceId/restorecurl -X POST "https://api.oblien.com/workspace/ws_a1b2c3d4/restore" \
-H "X-Client-ID: $OBLIEN_CLIENT_ID" \
-H "X-Client-Secret: $OBLIEN_CLIENT_SECRET"Create archive
Create a versioned disk archive. Archives are lighter than snapshots - they capture the disk but not memory state.
await ws.archives.create('ws_a1b2c3d4', {
version: 1,
format: 'tar',
vm_paths: ['/app', '/data'],
exclude_vm_paths: ['/app/node_modules'],
});POST /workspace/:workspaceId/archives{
"version": 1,
"format": "tar",
"vm_paths": ["/app", "/data"],
"exclude_vm_paths": ["/app/node_modules"]
}curl -X POST "https://api.oblien.com/workspace/ws_a1b2c3d4/archives" \
-H "X-Client-ID: $OBLIEN_CLIENT_ID" \
-H "X-Client-Secret: $OBLIEN_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{
"vm_paths": ["/app"],
"exclude_vm_paths": ["/app/node_modules"]
}'Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
version | number | No | Archive version number |
format | string | No | Archive format |
vm_paths | string[] | No | Paths to include |
exclude_vm_paths | string[] | No | Paths to exclude |
List archives
Get all archives for a workspace.
const archives = await ws.archives.list('ws_a1b2c3d4');GET /workspace/:workspaceId/archivescurl "https://api.oblien.com/workspace/ws_a1b2c3d4/archives" \
-H "X-Client-ID: $OBLIEN_CLIENT_ID" \
-H "X-Client-Secret: $OBLIEN_CLIENT_SECRET"Response
{
"success": true,
"archives": [
{ "version": 1, "created_at": "2026-02-24T10:30:00Z", "size": 52428800 },
{ "version": 2, "created_at": "2026-02-24T12:00:00Z", "size": 53477376 }
]
}Get archive
Get details of a specific archive version.
const archive = await ws.archives.get('ws_a1b2c3d4', 1);GET /workspace/:workspaceId/archives/:versioncurl "https://api.oblien.com/workspace/ws_a1b2c3d4/archives/1" \
-H "X-Client-ID: $OBLIEN_CLIENT_ID" \
-H "X-Client-Secret: $OBLIEN_CLIENT_SECRET"Delete archive
Delete a specific archive version.
await ws.archives.delete('ws_a1b2c3d4', 1, {
delete_file: true,
});DELETE /workspace/:workspaceId/archives/:version?delete_file=truecurl -X DELETE "https://api.oblien.com/workspace/ws_a1b2c3d4/archives/1?delete_file=true" \
-H "X-Client-ID: $OBLIEN_CLIENT_ID" \
-H "X-Client-Secret: $OBLIEN_CLIENT_SECRET"Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
delete_file | string | "false" | Set to "true" to also delete the physical archive file |
Delete all archives
Delete all archives for a workspace.
await ws.archives.deleteAll('ws_a1b2c3d4', {
delete_files: true,
});DELETE /workspace/:workspaceId/archives?delete_files=truecurl -X DELETE "https://api.oblien.com/workspace/ws_a1b2c3d4/archives?delete_files=true" \
-H "X-Client-ID: $OBLIEN_CLIENT_ID" \
-H "X-Client-Secret: $OBLIEN_CLIENT_SECRET"Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
delete_files | string | "false" | Set to "true" to also delete physical files |