https://github.com/client-api/pve-go
Go SDK for the Proxmox Virtual Environment (PVE) API.
https://github.com/client-api/pve-go
go proxmox pve sdk
Last synced: 20 days ago
JSON representation
Go SDK for the Proxmox Virtual Environment (PVE) API.
- Host: GitHub
- URL: https://github.com/client-api/pve-go
- Owner: client-api
- License: apache-2.0
- Created: 2026-05-07T21:55:11.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-23T07:12:37.000Z (about 1 month ago)
- Last Synced: 2026-05-23T08:28:54.322Z (about 1 month ago)
- Topics: go, proxmox, pve, sdk
- Language: Go
- Homepage:
- Size: 2.52 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pve-go
Go SDK for the Proxmox Virtual Environment API. Generated from
the upstream `apidoc.js` from Proxmox VE via [openapi-generator-cli][gen] with custom
Mustache template overrides.
> **Not an official Proxmox project.** Community SDK derived from the
> upstream `apidoc.js`. Always verify against the upstream API viewer.
> .
Requires Go ≥ 1.22.
## Install
```bash
go get github.com/client-api/pve-go
```
## Usage
```go
package main
import (
"context"
"fmt"
"github.com/client-api/pve-go"
)
func main() {
cfg := openapi.NewConfiguration()
cfg.Servers[0].URL = "https://pve1.example.com:8006/api2/json"
cfg.AddDefaultHeader("Authorization", "PVEAPIToken=user@realm!tokenid=uuid-secret")
pve := openapi.NewPve(cfg)
status, _, err := pve.QemuAPI.QemuVmStatus(context.Background(), "pve1", 100).Execute()
if err != nil {
panic(err)
}
fmt.Printf("%+v\n", status)
}
```
`Pve` is a brand alias for the generator's `*APIClient`, which already
exposes every per-tag API as a struct field
(`QemuAPI`, `LxcAPI`, `ClusterAPI`, …).
## Compound configs
PVE encodes many fields as CLI-style shorthand strings
(`net0=virtio,bridge=vmbr0,firewall=1`). Round-trip helpers are
emitted for every compound config schema:
```go
cfg := openapi.PveQemuNetConfig{
Model: "virtio",
Bridge: stringPtr("vmbr0"),
Firewall: int32Ptr(1),
}
shorthand := cfg.ToShorthand()
// → "virtio,bridge=vmbr0,firewall=1"
```
## License
Apache 2.0 — see [LICENSE](./LICENSE).
[gen]: https://openapi-generator.tech