Get a private network
GET /api/v2/private-networks/{id}
Get one private network with its subnets and the VPSes attached to it. Each subnet shows its range, VLAN tag, gateway and status. A VPS counts as attached when it has an interface in one of the subnets. unusedAddressReservationCount counts private addresses that are reserved but not used by any VPS.
Authentication: An API key with the scope read:network. About keys and scopes
Request
Path parameters
idstringrequiredThe private network ID (
pnet_…).Example
curl "https://cloud.hostup.se/api/v2/private-networks/pnet_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The private network.
{ "id": "pnet_01hxa3b4c5d6e7f8g9h0j1k2m3", "name": "production-private", "parentCidr": "10.201.40.0/21", "region": "dc1r28", "status": "active", "subnetCount": 1, "attachedVpsCount": 1, "subnets": [ { "id": "subnet_01hxa3b4c5d6e7f8g9h0j1k2m3", "subnetCidr": "10.201.40.0/24", "vlanTag": 214, "gateway": "10.201.40.1", "status": "active" } ], "attachedVps": [ { "id": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3", "name": "web-01", "primaryIp": "192.0.2.10" } ], "actions": { "canAddSubnet": { "allowed": false, "reason": "Private network limit reached." } }, "createdAt": "2026-04-27T12:00:00.000Z", "unusedAddressReservationCount": 0}Response fields
idstringThe private network ID (
pnet_…).namestringName given when the network was created.
parentCidr when it has none.parentCidrstringThe network’s IPv4 range, a /21. Each subnet is a /24 inside it.
regionstringdeprecatedDeprecated. Location slug of the network. Private networks span the whole Hostup network. You can ignore it.
statusstringprovisioning: being set up on the network. active: ready. deprovisioning: being removed. retired: no longer in use. unknown: the state could not be read. One of provisioning, active, deprovisioning, retired, unknown.subnetCountintegerNumber of subnets that are not retired.
attachedVpsCountintegerNumber of VPSes with an interface in one of the subnets.
subnetsarray of objectEvery subnet in the network, retired ones included.
idstringThe subnet ID (
subnet_…).subnetCidrstringThe subnet’s range, a /24.
vlanTaginteger or nullVLAN tag of the subnet.
null until one is assigned.gatewaystring or nullFirst usable address in the subnet.
null when not known yet.statusstringprovisioning: being set up on the network. active: ready. deprovisioning: being removed. retired: no longer in use. unknown: the state could not be read. One of provisioning, active, deprovisioning, retired, unknown.attachedVpsarray of objectVPSes with an interface in one of the subnets.
idstringThe VPS ID (
vps_…).namestringHostname or label of the VPS.
primaryIpstring or nullMain public IPv4 address of the VPS.
null when not known.actionsobjectcanAddSubnetobjectWhether
POST /api/v2/private-networks can add another subnet now. allowed is false with a reason when the subnet quota is full.allowedbooleanreasonstring or nullWhy no subnet can be added.
null when allowed is true.createdAtstring or nullWhen the network was created.
unusedAddressReservationCountintegerPrivate addresses reserved in the network that no VPS interface uses. Free them with
POST /api/v2/private-networks/{id}/actions/cleanup-unused-reservations.Errors
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 | No private network with this ID in your account. code is private_network_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. |