FugokuFugoku Docs
Mask

Servers

Create, list, and manage bare metal servers and virtual machines

Servers

Servers are Fugoku's unified compute resource, covering both bare metal and virtual machines. They are modeled after the Latitude.sh server API and use JSON:API formatting.

Server Roles

RoleDescription
BareMetalDedicated physical server with IPMI access
VirtualMachineVirtualized instance running on shared hardware

List Servers

GET /v1/servers

Returns a paginated list of servers for the authenticated project. Includes both bare metal and virtual machines.

Query Parameters:

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20, max: 100)
sortstringSort field: createdAt, hostname, status, site
fields[servers]stringComma-separated fields to include

Example:

curl "https://api.fugoku.com/v1/servers?page=1&limit=20&sort=createdAt" \
  -H "Authorization: Bearer $TOKEN"

Get Server

GET /v1/servers/:id

Returns a single server by ID.

Create Server

POST /v1/servers

Creates a new server from the server catalog. Use role: "VirtualMachine" to create a VM instead of bare metal.

Request Body (JSON:API format):

{
  "data": {
    "type": "servers",
    "attributes": {
      "name": "my-server",
      "hostname": "my-server.example.com",
      "project": "default",
      "site": "NYC",
      "plan": "rs4.metal.large",
      "operating_system": "ubuntu-24.04",
      "billing": "hourly",
      "ssh_keys": ["key-abc123"],
      "user_data": "#cloud-init\n...",
      "tags": [{ "key": "env", "value": "production" }],
      "role": "VirtualMachine",
      "provider": "latitude",
      "worker_count": 1,
      "spot": false,
      "accelerators": "A100:1"
    }
  }
}
FieldTypeRequiredDescription
namestringYesServer name (1–64 chars)
hostnamestringYesServer hostname
sitestringYesData center site
planstringYesPlan slug from catalog
operating_systemstringYesOS slug from catalog
billingstringYeshourly, monthly, or yearly
ssh_keysarrayNoSSH key slugs to inject
user_datastringNoCloud-init script
tagsarrayNoKey-value tags
rolestringNoBareMetal or VirtualMachine
providerstringNoProvider ID (required for VMs)
worker_countintegerNoNumber of workers (VMs)
spotbooleanNoUse spot pricing (VMs)
acceleratorsstringNoGPU accelerators (VMs)

Example:

curl -X POST https://api.fugoku.com/v1/servers \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "type": "servers",
      "attributes": {
        "name": "my-server",
        "hostname": "my-server.example.com",
        "site": "NYC",
        "plan": "rs4.metal.large",
        "operating_system": "ubuntu-24.04",
        "billing": "hourly"
      }
    }
  }'

Response (201 Created):

{
  "data": {
    "id": "srv-abc123",
    "type": "servers",
    "attributes": {
      "hostname": "my-server.example.com",
      "label": "my-server",
      "status": "creating",
      "ipmiStatus": "Normal",
      "role": "BareMetal",
      "site": "NYC",
      "locked": false,
      "rescueAllowed": false,
      "billing": "hourly"
    }
  }
}

Update Server

PATCH /v1/servers/:id

Update label, locked, tags, or plan. Changing the plan triggers a migration and sets status to migrating.

Request body:

{
  "data": {
    "type": "servers",
    "attributes": {
      "label": "new-label",
      "locked": true,
      "tags": [{ "key": "env", "value": "staging" }],
      "plan": "m4.metal.xlarge"
    }
  }
}

Delete Server

DELETE /v1/servers/:id

Returns 204 No Content. The server is marked for deletion and scheduled for removal.

Server Actions

POST /v1/servers/:id/actions

Request body:

{
  "data": {
    "type": "actions",
    "attributes": {
      "action": "power_on"
    }
  }
}

Allowed actions: power_on, power_off, reboot

Example:

curl -X POST https://api.fugoku.com/v1/servers/srv-abc123/actions \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "type": "actions",
      "attributes": { "action": "power_off" }
    }
  }'

Server Backups

List Server Backups

GET /v1/servers/:id/backups

Returns backups for a bare metal server.

Create Server Backup

POST /v1/servers/:id/backups

Request body:

{
  "data": {
    "type": "backups",
    "attributes": {
      "name": "backup-before-upgrade"
    }
  }
}

Restore Backup

POST /v1/backups/:id/restore

Creates a new server from a backup. The original backup is archived.

Delete Backup

DELETE /v1/backups/:id

Returns 204 No Content. Backup is archived.

Server Status Values

ValueDescription
activeRunning
creatingProvisioning
deletingDeletion in progress
errorError state
inactivePowered off
installingOS installation
maintenanceMaintenance mode
pendingQueued for provisioning
rescuedRescue mode
rescuingEntering rescue mode
restartedRecently rebooted
scheduledScheduled for action
startingBooting
stoppedPowered off
stoppingShutting down
suspendedSuspended
terminatedPermanently deleted
updatingFirmware/OS update
waitingWaiting for resources

Server Roles

ValueDescription
BareMetalDedicated physical server
VirtualMachineVirtualized instance

On this page