Get the network setup of a VPS
GET /api/v2/vps/{id}/network
Returns the network interfaces of a VPS with their IP addresses and reverse DNS. It also lists the free addresses the VPS can take and its private networks. Read it before changing anything with POST /api/v2/vps/{id}/network. It holds the IDs and interface names those calls need. actions says what is allowed now. ipChangePolicy gives the price of the next IPv4 change and any change still waiting for payment. guestNetwork.status is mismatch when the running server does not use the addresses assigned to it. guestNetwork.actions.canRepair says whether the repair_guest_network action can fix that.
Authentication: An API key with the scopes read:vm and read:network and read:services. About keys and scopes
Request
Path parameters
idstringrequiredvps_…).Example
curl "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/network" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The network setup of the VPS.
{ "interfaces": [ { "id": "net0", "model": "virtio", "mac": "52:54:00:12:34:56", "bridge": "vmbr0", "vlan": 112, "firewallEnabled": true, "linkDown": false, "ip": [ { "id": "ip_01hxa3b4c5d6e7f8g9h0j1k2m3", "type": "ipv4", "ip": "203.0.113.42", "mask": "24", "main": true, "isPrivate": false, "revdns": "app-01.example.com", "rdnsAvailable": true, "vlan": 112, "subnet": { "id": null, "name": null, "parentCidr": "203.0.113.0/24", "gateway": "203.0.113.1" } } ] } ], "availableIPv4": [ { "id": "ip_01hxa3b4c5d6e7f8g9h0j1k2m3", "type": "ipv4", "ip": "203.0.113.10", "status": "available", "mask": "24", "main": false, "isPrivate": false, "vlan": null, "subnet": { "id": null, "name": null, "parentCidr": "203.0.113.0/24", "gateway": "203.0.113.1" } } ], "availableIPv6": [], "ipv4Limit": 1, "ipv6Limit": 0, "reservedPublicIpv4Count": 1, "reservedPublicIpv6Count": 0, "limits": { "ipv4": { "total": 1, "used": 1, "available": 0 }, "ipv6": { "total": 0, "used": 0, "available": 0 } }, "primaryIP": "203.0.113.42", "primaryIPrDNS": "app-01.example.com", "primaryRdnsAvailable": true, "primaryNetwork": { "id": null, "name": null, "parentCidr": "203.0.113.0/24", "gateway": "203.0.113.1" }, "guestNetwork": { "checked": true, "available": true, "vmRunning": true, "status": "mismatch", "reason": null, "interfaces": [ { "name": "eth0", "mac": "52:54:00:12:34:56", "ip": [ { "ip": "198.51.100.23", "type": "ipv4", "prefix": 24 } ] } ], "checks": [ { "interfaceName": "net0", "mac": "52:54:00:12:34:56", "guestInterfaceName": "eth0", "expectedIps": [ "203.0.113.42" ], "observedIps": [ "198.51.100.23" ], "missingIps": [ "203.0.113.42" ], "unexpectedIps": [ "198.51.100.23" ], "status": "mismatch", "actions": { "canRepair": { "allowed": true, "reason": null } } } ], "mismatches": [ { "interfaceName": "net0", "mac": "52:54:00:12:34:56", "guestInterfaceName": "eth0", "expectedIps": [ "203.0.113.42" ], "observedIps": [ "198.51.100.23" ], "missingIps": [ "203.0.113.42" ], "unexpectedIps": [ "198.51.100.23" ], "status": "mismatch", "actions": { "canRepair": { "allowed": true, "reason": null } } } ], "expectedIps": [ "203.0.113.42" ], "observedIps": [ "198.51.100.23" ], "missingIps": [ "203.0.113.42" ], "unexpectedIps": [ "198.51.100.23" ], "actions": { "canRepair": { "allowed": true, "reason": null } } }, "nativeNetwork": true, "ipAvailability": { "ipv4": { "availableCount": 0, "currentNetworkAvailableCount": 0, "currentNetworkKnown": true, "reason": null }, "ipv6": { "availableCount": 91, "currentNetworkAvailableCount": 0, "currentNetworkKnown": false, "reason": "No IPv6 subnet is currently attached to this VPS." } }, "vlanTag": 112, "ipv6UpgradeOption": { "key": "ipv6Addresses", "name": "IPv6 addresses", "min": 0, "max": 16, "step": 1, "monthlyPrice": 0, "currencyCode": "SEK", "currentValue": 0 }, "privateNetworks": [ { "parentCidr": "10.24.0.0/16", "status": "pending_switch", "subnets": [ { "id": "subnet_01hxa3b4c5d6e7f8g9h0j1k2m3", "subnetCidr": "10.24.10.0/24", "vlanTag": 220, "gateway": "10.24.10.1", "status": "retired", "usage": { "assignedIpCount": 1, "totalIpCount": 250 } } ] } ], "privateNetworkDefaults": { "vlanRange": { "min": 200, "max": 399 } }, "ipChangePolicy": { "freeChangeAvailable": false, "freeChangeExpiresAt": "2026-09-24T18:30:00.000Z", "price": { "amount": 2, "currencyCode": "EUR" }, "paidPrice": { "amount": 2, "currencyCode": "EUR" }, "paymentHoldHours": 4, "pausedUnderAttackUntil": null, "canChangeNow": true, "blockedReason": null, "blockedCode": null, "pendingChange": null }, "actions": { "canAddPublicInterface": { "allowed": false, "reason": "Your plan's IPv4 limit has been reached." }, "canAddIpv4": { "allowed": false, "reason": "Your plan's IPv4 limit has been reached." }, "canAddIpv6": { "allowed": false, "reason": "No IPv6 subnet is currently attached to this VPS." }, "canChangeIp": { "allowed": true, "reason": null, "code": null }, "canUpgradeIPv6": { "allowed": true, "reason": null }, "canCreatePrivateNetwork": { "allowed": true, "reason": null } }}Response fields
interfacesarray of objectnet0 is the primary public interface.idstring or nullnet0. Send it as interfaceName.modelstring or nullvirtio.macstring or nullbridgestring or nullvlannumber or nullfirewallEnabledbooleanlinkDownbooleaniparray of objectidstring or nullip_…). Send it as ipId.typestring or nullipv4 or ipv6.ipstring or nullmaskstring or null24.mainbooleanisPrivatebooleanrevdnsstring or nullrdnsAvailablebooleanvlannumber or nullsubnetobject or nullavailableIPv4array of objectidstring or nullip_…). Send it as ipId.typestring or nullipv4 or ipv6.ipstring or nullstatusstringavailable for a free address. assigned_to_account for an address the account already holds, such as a reserved IP. One of available, assigned_to_account.maskstring or nullmainbooleanisPrivatebooleanvlannumber or nullsubnetobject or nullavailableIPv6array of objectidstring or nullip_…). Send it as ipId.typestring or nullipv4 or ipv6.ipstring or nullstatusstringavailable for a free address. assigned_to_account for an address the account already holds, such as a reserved IP. One of available, assigned_to_account.maskstring or nullmainbooleanisPrivatebooleanvlannumber or nullsubnetobject or nullipv4Limitintegeripv6LimitintegerreservedPublicIpv4CountintegerreservedPublicIpv6Countintegerlimitsobjectipv4objecttotalintegerusedintegeravailableintegeripv6objecttotalintegerusedintegeravailableintegerprimaryIPstring or nullprimaryIPrDNSstring or nullprimaryRdnsAvailablebooleanprimaryNetworkobject or nullguestNetworkobject or nullnativeNetworkbooleanipAvailabilityobjectipv4objectavailableCountintegercurrentNetworkAvailableCountinteger or nullavailableCount on the primary interface’s network. Null when that network is not known.currentNetworkKnownbooleanreasonstring or nullipv6objectavailableCountintegercurrentNetworkAvailableCountinteger or nullavailableCount on the primary interface’s network. Null when that network is not known.currentNetworkKnownbooleanreasonstring or nullvlanTagnumber or nullipv6UpgradeOptionobject or nullprivateNetworksarray of objectparentCidrstring or nullstatusstring or nullsubnetsarray of objectidstring or nullsubnet_…). Send it as subnetId to create_private_interface.subnetCidrstring or nullvlanTagnumber or nullgatewaystring or nullstatusstring or nullretired subnet cannot take new interfaces.usageobject or nullprivateNetworkDefaultsobject or nullipChangePolicyobject or nullactionsobjectcanAddPublicInterfaceobjectcreate_public_interface.allowedbooleanreasonstring or nullcodestring or nullcanAddIpv4objectallowedbooleanreasonstring or nullcodestring or nullcanAddIpv6objectallowedbooleanreasonstring or nullcodestring or nullcanChangeIpobjectchange_ip. code is paused_under_attack or price_unavailable when not.allowedbooleanreasonstring or nullcodestring or nullcanUpgradeIPv6objectallowedbooleanreasonstring or nullcodestring or nullcanCreatePrivateNetworkobjectallowedbooleanreasonstring or nullcodestring or nullErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is vps_not_found. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |