Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6ed7d36
chore: removed unused files
iolave Aug 11, 2025
54eaa27
chore: simplified docs generation
iolave Aug 11, 2025
cf5d068
docs: renamed install script to install-paw
iolave Aug 11, 2025
2db8bd1
chore: make build doesn't have any deps now
iolave Aug 11, 2025
ad1d9ad
refactor: moved api wrapper code into it's own internal dir
iolave Aug 11, 2025
5847cc6
refactor: added new core service and new http client
iolave Aug 11, 2025
fad8084
refactor: renamed PVE struct to Client
iolave Aug 11, 2025
d93dbfe
refactor: new api implementation now uses github.com/iolave/go-errors…
iolave Aug 12, 2025
9f2e87d
api client will now contain raw pve requests
iolave Aug 13, 2025
c17c6fc
chore: removed unused type def
iolave Aug 13, 2025
21c9a68
fix: api wrapper request to pve api now passthrough query params
iolave Aug 17, 2025
b25effb
refactor: internal api_client is now can be used importing /pkg/api
iolave Aug 18, 2025
5de38d6
feat: added /api2/json/cluster/tasks implementations
iolave Aug 18, 2025
d08a1a8
feat: added /api2/json/cluster/options implementations
iolave Aug 18, 2025
97b5edc
feat: added /api2/json/cluster/resources implementations
iolave Aug 18, 2025
329c078
feat: added /api2/json/cluster/status implementations
iolave Aug 18, 2025
a3314c5
feat: added /api2/json/cluster/nextid implementations
iolave Aug 18, 2025
e796e0b
feat: added /api2/json/cluster/log implementations
iolave Aug 18, 2025
3a8003b
docs: added missing cluster implementations docs
iolave Aug 18, 2025
1fd11f0
docs: added missing cluster required permissions
iolave Aug 19, 2025
832e0cf
feat: added /api2/json/cluster/acme implementations
iolave Aug 19, 2025
8f2af41
fix: requests with int props are now pointers
iolave Aug 20, 2025
0126bec
feat: added /api2/json/cluster/backup implementations
iolave Aug 20, 2025
7cb3e0b
feat: added /api2/json/cluster/backup-info implementations
iolave Aug 20, 2025
52b6805
feat: added /api2/json/cluster/ceph implementations
iolave Aug 20, 2025
d1b3987
feat: added /api2/json/cluster/config implementations
iolave Aug 20, 2025
b235f30
refactor: api cluster/* and cluster/acme/* root methods were condense…
iolave Aug 21, 2025
dc870c5
feat: added /api2/json/cluster/firewall implementations
iolave Aug 24, 2025
1e27f29
fix: update group rule method doesnt fails anymore when type is not s…
iolave Aug 26, 2025
0cad193
feat: added /api2/json/cluster/ha implementations
iolave Aug 26, 2025
096dab5
chore: added missing mkdocs pip dependency
iolave Aug 26, 2025
0d9f862
feat: added /api2/json/cluster/jobs implementations
iolave Aug 26, 2025
2f93558
feat: added /api2/json/cluster/mapping implementations
iolave Aug 27, 2025
b76222e
feat: added /api2/json/cluster/metrics implementations
iolave Sep 1, 2025
000716c
feat: added /api2/json/cluster/notifications implementations
iolave Sep 27, 2025
49794c4
feat: added /api2/json/cluster/notifications/endpoints implementations
iolave Sep 27, 2025
4961e93
feat: added /api2/json/cluster/replication implementations
iolave Oct 27, 2025
59fc10a
feat: added /api2/json/cluster/sdn implementations
iolave Dec 8, 2025
e1cd4bf
chore: updated docs
iolave Dec 11, 2025
4122265
feat: the api pkg now have built-in credentials
iolave Dec 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install docs dependencies
run: make install-docs-dependencies
- name: Generate docs
run: make generate-docs
run: make docs
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
Expand Down
50 changes: 0 additions & 50 deletions .testcoverage.yml

This file was deleted.

21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
<!-- #################
# PVE API Wrapper
################# -->
### PVE API wrapper

#### Fixed
- PVE original passthrough handler now properly includes the request query params (resolves [#4](https://github.com/iolave/go-proxmox/issues/4)).

<!-- ################
# PVE API client
################ -->
### PVE API client

#### Added
- Added the `api` package that contains raw proxmox api implementations for:
- `/api2/json/access`
- `/api2/json/cluster`

#### Changed
- Renamed `pve.PVE` to `pve.Client`.
- Moved the `GetVersion` method from `pkg/pve` to `pkg/pve/core`.

## [v0.7.1]
### PVE API client
Expand Down
20 changes: 6 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
GOBIN ?= $$(go env GOPATH)/bin

.PHONY: install-docs-dependencies
install-docs-dependencies:
./scripts/install-docs-deps.sh

.phony: install-dependencies
install-dependencies: install-docs-dependencies
go mod tidy

.PHONY: test
test:
go test -v ./...
Expand All @@ -16,16 +8,16 @@ test:
coverage:
./scripts/coverage.sh

.PHONY: generate-docs
generate-docs: install-docs-dependencies
bash ./scripts/generate-docs.sh
.PHONY: docs
docs:
./scripts/generate-docs.sh

.PHONY: preview-docs
preview-docs: install-docs-dependencies generate-docs
bash ./scripts/preview-docs.sh
preview-docs:
./scripts/generate-docs.sh -p

.PHONY: build
build: install-dependencies
build:
$(eval $@GOOS = linux)
$(eval $@GOARCH = amd64)
CGO_ENABLED=0 GOOS=$($@GOOS) GOARCH=$($@GOARCH) go build -ldflags="-extldflags=-static" -o "bin/pve-api-wrapper-$($@GOOS)-$($@GOARCH)" ./cmd/pve_api_wrapper/pve_api_wrapper.go
Expand Down
74 changes: 67 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,73 @@
> [!WARNING]
> All versions released prior to `v1.0.0` are to be considered [breaking changes](https://semver.org/#how-do-i-know-when-to-release-100)

go-proxmox is a set of tools I built in order to manage proxmox instances remotely without too much effort.
A fully-featured set of tools for Proxmox Virtual Environment.
This repository provides three layers:

## Tools
- Proxmox go client: To see a list of all implemented api endpoints and more information, click [here].
- Proxmox cli (not available yet): Proxmox remote management tool.
- Proxmox [api wrapper]: Proxmox api wrapper that adds missing features to proxmox default one.
- Low-level 1:1 API implementation: minimal abstractions, closely matching the upstream Proxmox REST API. To see a list of all implemented api endpoints and more information, click [here].
- [API Wrapper] (binary): exposes additional features and allows original api calls to be passed through.
- High-level, ergonomic client – a set of well-documented Go interfaces that smooths over quirks of the raw API and integrates extensions provided by the wrapper.

[here]: https://go-proxmox.iolave.com/go-client/
[api wrapper]: https://go-proxmox.iolave.com/api-wrapper/
[telmate/terraform-provider-proxmox]: https://github.com/Telmate/terraform-provider-proxmox
[API Wrapper]: https://go-proxmox.iolave.com/api-wrapper/

## Features
### 1:1 Proxmox API Implementation
- Direct mapping of Proxmox endpoints, parameters, and responses.
- As close to upstream behavior as possible.
- Useful for users who need full control or raw input/output.
- Unclear or inconsistent API behaviors are intentionally preserved (mirrors the original).

### API Wrapper
Small binary that exposes:

- Original API.
- Custom API with missing functionality from the native one.

It is designed to be deployed on a Proxmox node.

### High-level Client
- Human-friendly Go API.
- Strong typing and validation where the raw API is ambiguous.
- Includes wrapper-only features

## Project Structure
```text
.
├── pkg/ # Packages that can be imported by other projects
│ │
│ ├── api/ # Proxmox API 1:1 implementation
│ ├── helpers/ # General purpose helpers
│ └── pve/ # High-level Proxmox API client
├── cmd/ # Command line tools
│ │
│ ├── pve-api-wrapper/ # Proxmox API wrapper
│ └── gomarkdoc/ # Documentation generator
├── internal/ # API Wrapper internals
├── scripts/ # Shell scripts, mostly for development and Makefile
├── docs/ # MKDocs documentation
├── README.md # This file
├── Makefile # Makefile for building, testing and documentation generation
├── LICENSE # License
├── go.mod # Go module definition
├── go.sum # Go module checksums
└── mkdocs.yml # MKDocs configuration
```

## Documentation
- The go client documentation is available [here].
- The API wrapper documentation is available [here](https://go-proxmox.iolave.com/api-wrapper/).

## Contributing
Contributions are welcome!

Please:

- Open an issue before large changes.
- Keep PRs focused and well‑scoped.
- Include relevant tests.

[here]: https://go-proxmox.iolave.com/go-client/
[API Wrapper]: https://go-proxmox.iolave.com/api-wrapper/
3 changes: 1 addition & 2 deletions cmd/gomarkdoc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ import (

func main() {
packages := []string{
"api",
"pve",
"helpers",
"cloudflare",
"errors",
}

for i := 0; i < len(packages); i++ {
Expand Down
2 changes: 1 addition & 1 deletion cmd/pve_api_wrapper/pve_api_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/alexflint/go-arg"
_ "github.com/iolave/go-proxmox/docs/api-wrapper"
"github.com/iolave/go-proxmox/internal/server"
"github.com/iolave/go-proxmox/internal/api_wrapper/server"
)

// @title Proxmox API Wrapper
Expand Down
6 changes: 3 additions & 3 deletions docs/api-wrapper/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ The pve api wrapper is an http server ment to be installed on the proxmox host s

## Installation
### Latest release
The installation script installs the `pve-api-wrapper` binary into `/usr/local/bin`.
The installation script installs the latest `pve-api-wrapper` binary into `/usr/local/bin`.

```bash
curl https://raw.githubusercontent.com/iolave/go-proxmox/refs/tags/latest/scripts/install.sh | bash
curl https://raw.githubusercontent.com/iolave/go-proxmox/refs/tags/latest/scripts/install-paw.sh | bash
```

_Inspect the installation script code [here]._
Expand Down Expand Up @@ -51,7 +51,7 @@ pve-api-wrapper [--version] [--pve-host PVE-HOST] [--pve-port PVE-PORT] [--host
sudo pve-api-wrapper service install
```

[here]: https://github.com/iolave/go-proxmox/blob/latest/scripts/install.sh
[here]: https://github.com/iolave/go-proxmox/blob/latest/scripts/install-paw.sh
[reference]: https://go-proxmox.iolave.com/api-wrapper/reference/
<!--
TODO: host the shell script within the docs https://github.com/squidfunk/mkdocs-material/discussions/3458
Expand Down
Loading