Virtual Machine
List virtual machines
Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first.
get/core/virtual-machines
Request
- Base URL: https://infrahub-api.nexgencloud.com/v1
- URL: https://infrahub-api.nexgencloud.com/v1/core/virtual-machines
- Auth: API key in header api_key
Query parameters
pageinteger
Page number to retrieve.
pageSizeinteger
Number of items to return per page.
searchstring
Filter results by case-insensitive substring match against the resource name.
environmentstring
Filter results to a specific environment by name.
exclude_firewallsinteger[]
Comma-separated list of Security Group IDs to ignore instances attached
exact_environment_matchboolean
Flag to filter environment by exact match instead of partial match
Response
Success
Example response
{
"status": true,
"message": "Getting VMs successful",
"instances": [
{
"id": 1402,
"name": "example-vm",
"status": "CREATING",
"environment": {
"id": 9876,
"name": "example-environment",
"org_id": 7613,
"region": "NORWAY-1",
"features": {
"green_status": "GREEN"
}
},
"image": {
"name": "Ubuntu Server 24.04 LTS (Noble Numbat)"
},
"flavor": {
"id": 8429,
"name": "n1-cpu-small",
"cpu": 4,
"ram": 4,
"disk": 100
},
"os": "Ubuntu Server 24.04 LTS (Noble Numbat)",
"keypair": {
"name": "example-keypair"
},
"volume_attachments": [
{
"volume": {
"id": 1402,
"name": "example-volume",
"description": "example",
"volume_type": "Cloud-SSD",
"size": 10
},
"status": "ATTACHING",
"device": "/dev/disk/by-id/virtio-a66fd1a8-e198-4eb4-a",
"created_at": "2026-05-06T16:04:09Z"
}
],
"security_rules": [
{
"id": 1129,
"direction": "egress",
"protocol": "any",
"port_range_min": 1,
"port_range_max": 65535,
"ethertype": "IPv4",
"remote_ip_prefix": "0.0.0.0/0",
"status": "SUCCESS",
"created_at": "2026-05-06T15:18:42Z"
}
],
"power_state": "NOSTATE",
"vm_state": "building",
"fixed_ip": "192.0.2.91",
"floating_ip": "203.0.113.205",
"floating_ip_status": "NO FLOATING IP",
"port_randomization_status": "NO_FLOATING_IP",
"port_randomization": true,
"created_at": "2026-05-06T16:04:09Z"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.