Skip to content
Docs

List VMs

GET/v1/compute/vms

List all VMs

Query ParametersExpand Collapse
project_id: string

Project ID of resources to request

cursor: optional string

Pagination cursor returned by a previous request

limit: optional number

Maximum number of items to return

maximum100
minimum10
ReturnsExpand Collapse
VMList object { items, pagination }
items: array of VM { id, boot_volume_id, cpu_config, 16 more }
id: string

Unique identifier for the VM.

boot_volume_id: string

ID of the boot volume attached to the VM.

cpu_config: CPUConfig { vcpu }

CPU configuration for the VM.

vcpu: number

Number of virtual CPUs.

maximum192
minimum1
created_at: string

When the VM was created.

formatdate-time
data_volume_ids: array of string

IDs of the data volumes attached to the VM.

memory_config: MemoryConfig { size }

Memory configuration for the VM.

size: number

Size of the memory in GB.

maximum768
minimum1
name: string

Name of the VM.

private_ip: string

Private IP of the VM.

project_id: string

Project ID the VM belongs to.

public_ip: string

Public IP of the VM.

public_ip_enabled: boolean

Whether the public IP is enabled for the VM.

region: RegionName

Region the resource is in.

Status of the resource.

One of the following:
"pending"
"creating"
"updating"
"ready"
"deleting"
"deleted"
"error"
subnet_id: string

ID of the subnet the VM is in.

tags: array of string

Tags to attach to the VM.

updated_at: string

When the VM was updated.

formatdate-time
vpc_id: string

ID of the VPC the VM is in.

vpc_name: string

Name of the VPC the VM is in.

instance_type: optional string

Instance type name.

List VMs

curl https://api.nirvanalabs.io/v1/compute/vms \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "boot_volume_id": "123e4567-e89b-12d3-a456-426614174000",
      "cpu_config": {
        "vcpu": 2
      },
      "created_at": "2025-01-01T00:00:00Z",
      "data_volume_ids": [
        "123e4567-e89b-12d3-a456-426614174001",
        "123e4567-e89b-12d3-a456-426614174002"
      ],
      "memory_config": {
        "size": 2
      },
      "name": "my-vm",
      "private_ip": "10.0.0.1",
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "public_ip": "123.123.123.123",
      "public_ip_enabled": true,
      "region": "us-sva-2",
      "status": "ready",
      "subnet_id": "123e4567-e89b-12d3-a456-426614174000",
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z",
      "vpc_id": "123e4567-e89b-12d3-a456-426614174000",
      "vpc_name": "my-vpc",
      "instance_type": "n1-standard-8"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}
Returns Examples
{
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "boot_volume_id": "123e4567-e89b-12d3-a456-426614174000",
      "cpu_config": {
        "vcpu": 2
      },
      "created_at": "2025-01-01T00:00:00Z",
      "data_volume_ids": [
        "123e4567-e89b-12d3-a456-426614174001",
        "123e4567-e89b-12d3-a456-426614174002"
      ],
      "memory_config": {
        "size": 2
      },
      "name": "my-vm",
      "private_ip": "10.0.0.1",
      "project_id": "123e4567-e89b-12d3-a456-426614174000",
      "public_ip": "123.123.123.123",
      "public_ip_enabled": true,
      "region": "us-sva-2",
      "status": "ready",
      "subnet_id": "123e4567-e89b-12d3-a456-426614174000",
      "tags": [
        "production",
        "ethereum"
      ],
      "updated_at": "2025-01-01T00:00:00Z",
      "vpc_id": "123e4567-e89b-12d3-a456-426614174000",
      "vpc_name": "my-vpc",
      "instance_type": "n1-standard-8"
    }
  ],
  "pagination": {
    "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
    "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
    "total_count": 125
  }
}