Skip to content
Get started

List snapshots

client.Snapshots.List(ctx, query) (*[]Snapshot, error)
get/snapshots

List snapshots

ParametersExpand Collapse
query SnapshotListParams
Kind param.Field[SnapshotKind]optional

Filter snapshots by kind

Name param.Field[string]optional

Filter snapshots by snapshot name

SourceInstanceID param.Field[string]optional

Filter snapshots by source instance ID

Tags param.Field[map[string, string]]optional

Filter snapshots by tag key-value pairs.

ReturnsExpand Collapse
type SnapshotListResponse []Snapshot
ID string

Auto-generated unique snapshot identifier

CreatedAt Time

Snapshot creation timestamp

formatdate-time

Snapshot capture kind

Accepts one of the following:
const SnapshotKindStandby SnapshotKind = "Standby"
const SnapshotKindStopped SnapshotKind = "Stopped"
SizeBytes int64

Total payload size in bytes

formatint64
SourceHypervisor SnapshotSourceHypervisor

Source instance hypervisor at snapshot creation time

Accepts one of the following:
const SnapshotSourceHypervisorCloudHypervisor SnapshotSourceHypervisor = "cloud-hypervisor"
const SnapshotSourceHypervisorFirecracker SnapshotSourceHypervisor = "firecracker"
const SnapshotSourceHypervisorQemu SnapshotSourceHypervisor = "qemu"
const SnapshotSourceHypervisorVz SnapshotSourceHypervisor = "vz"
SourceInstanceID string

Source instance ID at snapshot creation time

SourceInstanceName string

Source instance name at snapshot creation time

Name stringoptional

Optional human-readable snapshot name (unique per source instance)

Tags map[string, string]optional

User-defined key-value tags.

List snapshots
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"),
  )
  snapshots, err := client.Snapshots.List(context.TODO(), hypeman.SnapshotListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", snapshots)
}
[
  {
    "id": "q7z1w7l2af4l8y7q1h7g2m3s",
    "created_at": "2026-03-06T13:56:11Z",
    "kind": "Standby",
    "size_bytes": 104857600,
    "source_hypervisor": "cloud-hypervisor",
    "source_instance_id": "qilviffnqzck2jrim1x6s2b1",
    "source_instance_name": "nginx1",
    "name": "baseline-standby",
    "tags": {
      "team": "backend",
      "env": "staging"
    }
  }
]
Returns Examples
[
  {
    "id": "q7z1w7l2af4l8y7q1h7g2m3s",
    "created_at": "2026-03-06T13:56:11Z",
    "kind": "Standby",
    "size_bytes": 104857600,
    "source_hypervisor": "cloud-hypervisor",
    "source_instance_id": "qilviffnqzck2jrim1x6s2b1",
    "source_instance_name": "nginx1",
    "name": "baseline-standby",
    "tags": {
      "team": "backend",
      "env": "staging"
    }
  }
]