Vps

Virtual Machines

Deploy and manage virtual private servers with full control over your cloud infrastructure.

Virtual Machines

Deploy and manage virtual private servers with full control over your cloud infrastructure.

List VMs

GET /projects/{project}/products?detailed=true

Retrieve all virtual machines and other products in a project.

Path Parameters

NameTypeDescription
projectstringUnique project identifier

Query Parameters

NameTypeDescription
detailedbooleanOptional. Include detailed product information

Headers

NameTypeDescription
AuthorizationstringBearer token for authentication

Response

200 - Success

[
  {
    "uid": "vm_abc123",
    "type": "vps", 
    "name": "Web Server 01",
    "details": {
      "ipv4": "192.121.119.100",
      "ipv6": "2001:67c:bec:b::100/64",
      "status": "online"
    }
  },
  {
    "uid": "vm_def456",
    "type": "vps",
    "name": "Database Server", 
    "details": {
      "ipv4": "192.121.119.101",
      "ipv6": "2001:67c:bec:b::101/64", 
      "status": "offline"
    }
  }
]

Create VM

POST /projects/{project}/products

Deploy a new virtual machine with your choice of operating system and specifications.

Path Parameters

NameTypeDescription
projectstringUnique project identifier

Headers

NameTypeDescription
AuthorizationstringBearer token for authentication

Request Body

NameTypeDescription
basketarrayArray of products to order
basket.productstringProduct type (vps)
basket.namestringDisplay name for the VM
basket.typestringPackage type (CRA, Budget)
basket.packagestringPackage name (Basic, Standard, etc.)
basket.osstringOperating system (ubuntu, debian, centos, etc.)
basket.versionstringOS version (22.04, 11, 7, etc.)
basket.sshkeysarrayOptional. Array of SSH key UIDs

Example Request:

{
  "basket": [
    {
      "product": "vps",
      "name": "Web Server 01", 
      "type": "CRA",
      "package": "Basic",
      "os": "ubuntu",
      "version": "22.04",
      "sshkeys": ["key_abc123"]
    }
  ]
}

Response

200 - Success (Hourly Billing)

{
  "success": true,
  "products": [
    {
      "product": "vps",
      "uid": "vm_abc123",
      "name": "Basic VPS (Web Server 01)",
      "sku": "vps_CRA_Basic", 
      "os": "ubuntu",
      "version": "22.04",
      "sshkeys": "ssh-rsa AAAAB3NzaC1yc2E..."
    }
  ]
}

200 - Success (Subscription Billing)

{
  "success": true,
  "testMode": false,
  "link": "https://mobilepay.dk/buy/..."
}

Get VM Details

GET /projects/{project}/products/{product}/vps

Retrieve comprehensive information about a specific virtual machine.

Path Parameters

NameTypeDescription
projectstringUnique project identifier
productstringUnique product/VM identifier

Headers

NameTypeDescription
AuthorizationstringBearer token for authentication
PermissionstringREAD_VPS

Response

200 - Success

{
  "uid": "vm_abc123",
  "type": "vps",
  "name": "Web Server 01",
  "price": 49,
  "created": "2025-01-01T00:00:00Z",
  "showPassword": 1,
  "status": "online",
  "package": {
    "type": "CRA",
    "name": "Basic", 
    "vCores": 1,
    "memory": 1024,
    "storage": 25000
  },
  "ip": {
    "ipv4": "192.121.119.100",
    "ipv4Gateway": "192.121.119.1",
    "ipv4PTR": null,
    "ipv6": "2001:67c:bec:b::100/64", 
    "ipv6Gateway": "2001:67c:bec:b::1"
  },
  "os": {
    "type": "linux",
    "flavor": "ubuntu",
    "version": "22.04"
  },
  "node": {
    "datacenter": "Copenhagen",
    "cluster": "ar5", 
    "node": "ar5-01"
  }
}