List networks
GET/api/v1/network
The private networks of the account. Every account starts with one on a router, so a server in it can have a public address.
Example request
curl -X GET "https://platform.serverscamp.com/api/v1/network" \
-H "Authorization: Bearer $API_TOKEN"import os, requests
token = os.environ["API_TOKEN"]
r = requests.get(
f"https://platform.serverscamp.com/api/v1/network",
headers={"Authorization": f"Bearer {token}"},
)
r.raise_for_status()
print(r.json())const r = await fetch(`https://platform.serverscamp.com/api/v1/network`, {
method: 'GET',
headers: { Authorization: `Bearer ${process.env.API_TOKEN}` },
});
console.log(r.status, await r.json());Answer
Status 200 with this body.
| Field | Type | Description |
|---|---|---|
| items | list of NetworkResponserequired | List of networks |
| items[].network_uuid | stringrequired | Network UUID |
| items[].name | stringrequired | Network name |
| items[].cidr | stringrequired | Network CIDR |
| items[].network_type | string | Network type: private or public |
| items[].router_uuid | string, optional | Attached router UUID |
| items[].status | string | Network status: pending, active, attaching, detaching, deleting, failed |
| items[].status_error | string, optional | Error message when the last operation failed |
| items[].created_at | string, optional | Creation timestamp |
| total | integerrequired | Total number of networks |
{
"items": [
{
"network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
"name": "default",
"cidr": "10.0.0.0/24",
"network_type": "private",
"router_uuid": "5c0d9e8f-1a2b-4c3d-8e7f-6a5b4c3d2e1f",
"status": "active",
"status_error": null,
"created_at": "2026-10-20T10:00:00Z"
}
],
"total": 1
}Errors
| Status | When |
|---|---|
401 | No token, or a token that is not valid |
422 | The body or a parameter is not what the operation takes |
Every operation can also answer 401 without a valid token. All errors