Loading…
Loading documentation...
Coming-soon Node.js SDK — use @serversareup/cli or the REST API today
Coming soon —
@serversareup/sdkis not published yet. Use@serversareup/cli, the REST API v1, or the MCP server today. The examples below show the intended typed client.
# COMING SOON — no @serversareup/sdk package is published in npm today.
Requires Node.js 18 or higher when shipped. Full TypeScript support is Coming soon with the package.
import { ServersAreUp } from '@serversareup/sdk';
const client = new ServersAreUp({
apiKey: process.env.SAU_API_KEY,
});
The future typed client must mirror the accepted REST contract; it must not invent methods for Coming-soon routes.
| Capability | Current REST status |
|---|---|
| List and inspect existing instances | GET routes are available |
| Update name or tags | PATCH instance detail is available; a hostname field answers 400 |
| Start, stop, or restart | Power POST is available |
| Recoverable deletion | DELETE instance detail returns 202 |
| Create an instance | Coming soon; collection POST is 405 and deploy POST is 501 |
| Raw config or ISO operations | 501 on OpenStack |
| Resize | 202 with the provider command: a Linux plan server moves to a larger plan of its family; another server answers 501 |
| Rebuild | 202 with the provider command: the OS a server was bought with is reinstalled (Windows, and the Linux plans) |
| Clone | Coming soon; returns 409 without creating a clone |
| Snapshot or backup creation | 202 with the provider command; reads are metadata only |
| Block volumes | No customer /api/v1/volumes route exists |
No executable instance-creation or block-volume SDK method is documented. Use the REST reference for accepted operations and export critical guest data to storage you control.
import {
AuthenticationError,
NotFoundError,
RateLimitError,
ValidationError,
} from '@serversareup/sdk';
try {
await client.instances.get('ins_invalid');
} catch (err) {
if (err instanceof NotFoundError) {
console.log('Instance not found');
} else if (err instanceof RateLimitError) {
console.log(`Retry after ${err.retryAfter}s`);
} else if (err instanceof AuthenticationError) {
console.log('Invalid API key');
}
}
// Manual pagination
const page1 = await client.instances.list({ page: 1, perPage: 25 });
// Iterate all pages
for await (const instance of client.instances.listAll()) {
console.log(instance.name);
}
Verify incoming webhook signatures in an Express handler:
import { verifyWebhookSignature } from '@serversareup/sdk';
app.post('/webhooks/sau', (req, res) => {
const isValid = verifyWebhookSignature({
payload: req.body,
signature: req.headers['x-sau-signature'] as string,
secret: process.env.WEBHOOK_SECRET!,
});
if (!isValid) return res.status(401).send('Invalid signature');
// Process event
const event = req.body;
console.log(`Event: ${event.type}`);
res.sendStatus(200);
});
Every Servers Are Up virtual machine and container includes an integrated HTML5 browser-based SSH, RDP, and VNC console in your dashboard, default-off inbound firewall rules with per-IP allow-lists, and full programmatic control via REST API v1 and Model Context Protocol (MCP). Explore our Virtual Datacenter Plans or reach out to Servers Are Up Support.