Skip to content
Get started

List registered devices

client.Devices.List(ctx) (*[]Device, error)
get/devices

List registered devices

ReturnsExpand Collapse
type DeviceListResponse []Device
ID string

Auto-generated unique identifier (CUID2 format)

BoundToVfio bool

Whether the device is currently bound to the vfio-pci driver, which is required for VM passthrough.

  • true: Device is bound to vfio-pci and ready for (or currently in use by) a VM. The device's native driver has been unloaded.
  • false: Device is using its native driver (e.g., nvidia) or no driver. Hypeman will automatically bind to vfio-pci when attaching to an instance.
CreatedAt Time

Registration timestamp (RFC3339)

formatdate-time
DeviceID string

PCI device ID (hex)

IommuGroup int64

IOMMU group number

PciAddress string

PCI address

Type of PCI device

Accepts one of the following:
const DeviceTypeGPU DeviceType = "gpu"
const DeviceTypePci DeviceType = "pci"
VendorID string

PCI vendor ID (hex)

AttachedTo stringoptional

Instance ID if attached

Name stringoptional

Device name (user-provided or auto-generated from PCI address)

List registered devices
package main

import (
  "context"
  "fmt"

  "github.com/kernel/hypeman-go"
  "github.com/kernel/hypeman-go/option"
)

func main() {
  client := hypeman.NewClient(
    option.WithAPIKey("My API Key"),
  )
  devices, err := client.Devices.List(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", devices)
}
[
  {
    "id": "tz4a98xxat96iws9zmbrgj3a",
    "bound_to_vfio": false,
    "created_at": "2025-01-15T10:00:00Z",
    "device_id": "27b8",
    "iommu_group": 82,
    "pci_address": "0000:a2:00.0",
    "type": "gpu",
    "vendor_id": "10de",
    "attached_to": null,
    "name": "l4-gpu"
  }
]
Returns Examples
[
  {
    "id": "tz4a98xxat96iws9zmbrgj3a",
    "bound_to_vfio": false,
    "created_at": "2025-01-15T10:00:00Z",
    "device_id": "27b8",
    "iommu_group": 82,
    "pci_address": "0000:a2:00.0",
    "type": "gpu",
    "vendor_id": "10de",
    "attached_to": null,
    "name": "l4-gpu"
  }
]