Skip to content
# Servers

Servers

Server list, power actions, reinstall, console, firewall and cloud-init.

GET/servers

List your active (non-terminated) servers, including servers shared with you through an organization. Starred servers come first, then newest.

json
[
  {
    "id": "8f0c...",
    "hostname": "web-1",
    "status": "running",
    "starred": true,
    "ipv4": "203.0.113.10",
    "os": "Ubuntu 24.04",
    "location": "fsn",
    "config": { "cores": 2, "ram": 4, "disk": 20, "storage": "nvme", "bandwidth": 1 },
    "cost": { "monthly": 8.35 },
    "created_at": "2026-10-01T09:00:00Z"
  }
]
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

Prepare a web console session. 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, and needs no separate VNC password.

Response 200
json
{
  "ws_path": "/api/v1/console/vps-ws",
  "server_id": "<id>",
  "session_ref": "<id>"
}
Connect
bash
wss://bashrack.com/api/v1/console/vps-ws?serverId=<id>

409 not_running if the server is stopped, 409 not_provisioned before first deploy finishes, 409 console_unavailable for a server without a web console.

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 the public interface. 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": [{ "name": "public", "firewallEnabled": 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 the hostname injected by cloud-init after initial provisioning. Pure cloud-init config write — no guest agent, no command execution. The IP address, gateway and DNS come from the assigned IP pool and SSH keys are set at order time; passing sshKeys/ipConfig/nameserver 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": null,
  "nameserver": null,
  "hostname": "my-server"
}
PATCH body → 200
json
{
  "hostname": "web-prod-01"
}

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

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).