List VMs
GET/api/v1/vms
Every server of the account. Filter by a tag with tag_key and tag_value.
Parameters
| Name | In | Description |
|---|---|---|
| tag_key | query, string, optional | Only servers with this tag |
| tag_value | query, string, optional | Only servers whose tag_key has this value |
Example request
curl -X GET "https://platform.serverscamp.com/api/v1/vms" \
-H "Authorization: Bearer $API_TOKEN"import os, requests
token = os.environ["API_TOKEN"]
r = requests.get(
f"https://platform.serverscamp.com/api/v1/vms",
headers={"Authorization": f"Bearer {token}"},
)
r.raise_for_status()
print(r.json())const r = await fetch(`https://platform.serverscamp.com/api/v1/vms`, {
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 Vmrequired | |
| items[].vm_uuid | stringrequired | Server id |
| items[].display_name | string, optional | Name given at create |
| items[].vm_name | stringrequired | System name, also the DNS name of the server |
| items[].status | stringrequired | pending while it is created, then active; deleting, reinstalling and resizing while those run; failed or error when something went wrong |
| items[].state | string, optional | Power state: running, stopped and the like |
| items[].error | string, optional | What went wrong, when status is failed or error |
| items[].pending_op | map of object, optional | A power action still running, for example {"type": "vm_power", "action": "shutdown"}; null when none is |
| items[].vm_class_id | integerrequired | Plan id |
| items[].vm_class_name | string, optional | Plan name |
| items[].cpu_cores | integerrequired | vCPU cores |
| items[].memory_mb | integerrequired | Memory, MB |
| items[].storage_class_id | integerrequired | Disk id of the root disk |
| items[].storage_class_name | string, optional | Disk name of the root disk |
| items[].disk_gb | integerrequired | Root disk size, GB |
| items[].vm_template_id | integer, optional | Image the server was created with |
| items[].os_type | string, optional | System of the image |
| items[].ssh_key_id | integer, optional | SSH key of the scamp user |
| items[].network_uuid | stringrequired | Private network of the server |
| items[].network | VmNetworkInforequired | |
| items[].network.network_uuid | string, optional | Private network of the server |
| items[].network.ip_internal | string, optional | Private IPv4 address in that network |
| items[].network.ipv6_address | string, optional | IPv6 address |
| items[].network.public_ip_v4 | string, optional | Public IPv4 address of the server, if it has one |
| items[].network.public_ip_v6 | string, optional | Public IPv6 address of the server, if it has one |
| items[].network.floating_ip_v4 | string, optional | Floating IPv4 attached to the server |
| items[].network.floating_ip_v6 | string, optional | Floating IPv6 attached to the server |
| items[].os_user | stringrequired | User to log in as: scamp, with sudo |
| items[].os_password | stringrequired | Password of that user |
| items[].tags | map of stringrequired | Your tags |
| items[].created_at | stringrequired | When it was created, ISO 8601 |
| total | integerrequired |
{
"items": [
{
"vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
"display_name": "web-1",
"vm_name": "web-1-k3x9",
"status": "active",
"state": "running",
"error": null,
"pending_op": null,
"vm_class_id": 49,
"vm_class_name": "basic-4g",
"cpu_cores": 2,
"memory_mb": 4096,
"storage_class_id": 18,
"storage_class_name": "standard",
"disk_gb": 50,
"vm_template_id": 5,
"os_type": "Ubuntu",
"ssh_key_id": 42,
"network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
"network": {
"network_uuid": "a3e1f0c2-7d4b-4c6e-8f9a-0b1c2d3e4f50",
"ip_internal": "10.0.0.12",
"ipv6_address": "2a01:ea05:10:4::12",
"public_ip_v4": "185.236.10.44",
"public_ip_v6": "2a01:ea05:20:1::44",
"floating_ip_v4": null,
"floating_ip_v6": null
},
"os_user": "scamp",
"os_password": "Rk7vQ2mXp9LwT4sN",
"tags": {
"env": "production"
},
"created_at": "2026-11-01T09:20:14+00:00"
}
],
"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