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

ParameterTypeRequiredDescription
afterstringNoAction 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/restore
curl -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

ParameterTypeRequiredDescription
versionnumberNoArchive version number
formatstringNoArchive format
vm_pathsstring[]NoPaths to include
exclude_vm_pathsstring[]NoPaths to exclude

List archives

Get all archives for a workspace.

const archives = await ws.archives.list('ws_a1b2c3d4');
GET /workspace/:workspaceId/archives
curl "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/:version
curl "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=true
curl -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

ParameterTypeDefaultDescription
delete_filestring"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=true
curl -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

ParameterTypeDefaultDescription
delete_filesstring"false"Set to "true" to also delete physical files