Skip to content
# Servers

Servers

Power actions, reinstall, console, firewall, cloud-init and snapshots.

GET/servers/{id}

Get live server details including status, IP address, and resource config. Use server_id from the order response as the ID.

tip — get server_id from POST /orders or GET /orders/{id} response

json
{
  "id": "srv_...",
  "hostname": "srv-lt1-a3f9c2",
  "status": "running",
  "ipv4": "185.203.114.12",
  "os": "ubuntu-24.04",
  "location": "lt1",
  "config": {
    "cores": 4,
    "ram": 16,
    "disk": 240,
    "storage": "nvme",
    "bandwidth": 10
  },
  "cost": { "monthly": 48.86, "hourly": 0.067861 },
  "created_at": "2026-06-20T10:00:00Z",
  "terminated_at": null
}
POST/servers/{id}/action

Control a running or stopped server. Use server_id from the order response as the ID. Actions are applied asynchronously — poll GET /servers/{id} for the final status.

Request body
json
{
  "action": "reboot"
}
startstoppedBoot a stopped server
shutdownrunningGraceful OS shutdown
rebootrunningGraceful restart
resetrunningHard reset (no OS flush)
stoprunningForce power-off
Response 200
json
{
  "id": "srv_...",
  "status": "rebooting"
}

Status transitions: starting → running, stopping → stopped, rebooting / resetting → running

POST/servers/{id}/reinstall

Reinstall the server's OS from a fresh image. Pass osId (see GET /os) to switch images, or omit it to reinstall the current one. All data on disk is destroyed. Async — poll GET /servers/{id} for status.

Request body (optional)
json
{
  "osId": "debian-12"
}
Response 200
json
{
  "ok": true
}

409 terminated if the server is terminated, 409 server_provisioning / server_terminating / server_queued while another operation is in flight.

POST/servers/{id}/rename

Set the server's hostname.

Request body
json
{
  "hostname": "web-prod-01"
}
Response 200
json
{
  "ok": true
}

hostname: 3–80 chars, lowercase letters, digits, dots and dashes (^[a-z0-9][a-z0-9.-]*[a-z0-9]$).

POST/servers/{id}/star

Toggle the starred flag on a server (pins it in your dashboard). No request body.

json
{
  "starred": true
}
POST/servers/{id}/console/ticket

Mint a short-lived VNC ticket for the web console. The server must be running. Connect any RFB/noVNC client over the WebSocket proxy — the ws endpoint authenticates with your dashboard session cookie (browser), not the API token.

Response 200
json
{
  "ws_path": "/api/v1/console/ws",
  "ticket": "PVE:VNC:6A2F...",
  "port": 5900,
  "node": "fra-r12-b07"
}
Connect
bash
wss://bashrack.com/api/v1/console/ws?serverId=<id>&ticket=<urlencoded ticket>&port=5900&node=<node>
# pass the ticket again as the RFB password

409 not_running if the server is stopped, 409 not_provisioned before first deploy finishes.

GET+PATCH/servers/{id}/firewall

Per-VM firewall. GET returns options, rules, and network interfaces. PATCH updates options. POST /servers/{id}/firewall/rules adds a rule; PATCH/DELETE /servers/{id}/firewall/rules/{pos} update or remove one by position. POST /servers/{id}/firewall/net/{iface} toggles the firewall on one NIC (e.g. net0). Not every server supports this yet — an unsupported one returns 409 (feature_unavailable).

GET response 200
json
{
  "options": { "enable": 1, "policy_in": "DROP", "policy_out": "ACCEPT" },
  "rules": [
    {
      "pos": 0,
      "type": "in",
      "action": "ACCEPT",
      "enable": 1,
      "dport": "22",
      "proto": "tcp",
      "comment": "SSH"
    }
  ],
  "netDevices": [{ "iface": "net0", "firewall": true }]
}
POST /firewall/rules body → 201
json
{
  "type": "in",
  "action": "ACCEPT",
  "dport": "80,443",
  "proto": "tcp",
  "comment": "web"
}

→ { "ok": true }
GET+PATCH/servers/{id}/cloud-init

Change SSH keys, network config (static or DHCP), nameserver, and hostname after initial provisioning. Pure cloud-init config write — no guest agent, no command execution. For most servers, changing a field here makes cloud-init treat the VM's next reboot as a first boot and re-apply it — reliably, across every distro. Some servers only support hostname; passing sshKeys/ipConfig/nameserver for one of those returns 409 (feature_unavailable) instead of silently doing nothing. This only writes config; call POST /servers/{id}/action {"action":"reboot"} afterward to actually apply it.

GET response 200
json
{
  "sshKeys": "ssh-ed25519 AAAA...",
  "ipConfig": "ip=dhcp",
  "nameserver": null,
  "hostname": "my-server"
}
PATCH body → 200
json
{
  "hostname": "web-prod-01",
  "ipConfig": { "mode": "static", "ip": "203.0.113.10", "cidr": 24, "gateway": "203.0.113.1" },
  "sshKeys": "ssh-ed25519 AAAA...",
  "nameserver": "1.1.1.1 8.8.8.8"
}

→ { "ok": true, "rebootRequired": true }

ipConfig is either { "mode": "dhcp" } or { "mode": "static", "ip", "cidr", "gateway" }. Root password reset (see the console) uses the QEMU guest agent instead of cloud-init for an immediate effect that doesn't need a reboot, where available — some servers don't support it yet and return 409 (feature_unavailable).

GET+POST/servers/{id}/snapshots

List and create disk snapshots. Create requires a positive wallet balance. Names: 1–40 chars, letters, digits, _ and -. Deleting: DELETE /servers/{id}/snapshots/{snapshotId}. Rolling back: POST /servers/{id}/snapshots/{snapshotId}/rollback (snapshot must be active; the server reboots). Not every server supports snapshots yet — an unsupported one returns 409 (feature_unavailable).

GET response 200
json
[
  {
    "id": "snp_7Qw...",
    "name": "pre-upgrade",
    "description": "before ubuntu 26.04",
    "sizeGb": 12,
    "status": "active",
    "createdAt": "2026-07-01T10:20:00Z"
  }
]
POST body → 201
json
{
  "name": "pre-upgrade",
  "description": "optional, max 255 chars"
}

→ {
  "id": "snp_7Qw..."
}

Snapshot status is one of creating, active, rolling_back, deleting, failed. Creating on an empty wallet → 402 insufficient_balance.