corsinvest / cv4pve-api-php
Corsinvest Proxmox VE Client API PHP
Requires
- php: >=5.5.0
- lib-curl: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 9.2.4
- 9.2.3
- 9.2.2
- 9.2.1
- 9.2.0
- 9.1.0
- 9.0.0
- 8.4.1
- 8.4.0
- 8.3.0
- 8.2.3
- 8.2.2
- 8.2.1
- 8.2.0
- 8.1.4
- 8.1.3
- 8.1.2
- 8.1.1
- 8.1.0
- v8.0.1
- v8.0.0
- v7.4.0
- v7.3.0
- v7.2.1
- v7.2.0
- v7.1.0
- v7.0.1
- v7.0.0
- v6.4.4
- v2.4.4
- v2.4.3
- v2.4.2
- v2.4.1
- v2.4.0
- v2.3.0
- v2.2.0
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.1
- v2.0.0
- v1.1.2
- v1.1.1
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- dev-docs/seo
- dev-docs/home-steps
This package is auto-updated.
Last update: 2026-10-07 08:42:42 UTC
README
______ _ __
/ ____/___ __________(_)___ _ _____ _____/ /_
/ / / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
/ /___/ /_/ / / (__ ) / / / / |/ / __(__ ) /_
\____/\____/_/ /____/_/_/ /_/|___/\___/____/\__/
Proxmox VE API Client for PHP (Made in Italy)
The Proxmox VE API from PHP: a client with a method for every endpoint of the Proxmox VE API, running in your application and talking only to the API.
Why
An application that manages Proxmox VE (a customer portal, a scheduled job, a monitoring or billing tool) has to speak its REST API: tickets and tokens, paths, parameters, JSON, tasks that end later. Written by hand it is a layer of HTTP code to build and to keep up with every Proxmox VE release.
cv4pve-api-php is that layer, generated from the API itself. The calls follow the tree of the API, so the Proxmox VE API viewer is also the reference of the client.
It runs in your application and uses only the Proxmox VE API: nothing to install on the nodes, no SSH.
Features
- The whole API: a method for every endpoint and HTTP method, generated from the Proxmox VE API schema;
/nodes/{node}/qemu/{vmid}/configis$client->getNodes()->get('pve01')->getQemu()->get(100)->getConfig(). - One Result for every call: the HTTP outcome and the Proxmox VE data, read as objects or as arrays. A failed call does not throw.
- API token or password: with two-factor authentication, certificate validation and timeout.
- Tasks: start a backup, a clone or a migration, wait for its task and read whether it succeeded.
- Raw calls: GET, POST, PUT and DELETE on any path with an array of parameters, for the calls with many options and for endpoints newer than the library.
- No dependency: PHP with the curl extension, no other package.
Quick start
composer require corsinvest/cv4pve-api-php
<?php require __DIR__ . '/vendor/autoload.php'; use Corsinvest\ProxmoxVE\Api\PveClient; // connect to any node of the cluster, with an API token $client = new PveClient('pve01', 8006); $client->setApiToken('automation@pve!app=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'); // GET /nodes/{node}/qemu/{vmid}/status/current $result = $client->getNodes()->get('pve01')->getQemu()->get(100)->getStatus()->getCurrent()->vmStatus(); echo $result->isSuccessStatusCode() ? "VM {$result->getResponse()->data->vmid} is {$result->getResponse()->data->status}" : "{$result->getStatusCode()} {$result->getReasonPhrase()}";
What the token needs: Permissions.
The first two numbers of the version are the Proxmox VE version the client was generated from: 9.2.x is for Proxmox VE 9.2. Changes of each release: CHANGELOG.md.
Documentation
| Getting started | Install, connect, first calls |
| Connection | API token or password, two-factor authentication, certificates, timeout |
| Permissions | The user, the token and the privileges an application needs |
| Concepts | API structure, results, indexed parameters, tasks, errors |
| Examples | Common tasks, creating a VM, bulk operations |
| Troubleshooting | Debug output and the common errors |
Related tools
Prefer a command line? cv4pve-cli calls the same API from any shell. The same client for .NET: cv4pve-api-dotnet. For Java: cv4pve-api-java. From PowerShell: cv4pve-api-powershell. The whole suite: corsinvest.it/cv4pve.
Support
Professional support and consulting available through Corsinvest.
By developers, for developers.
Part of cv4pve suite | Made with ❤️ in Italy by Corsinvest
Proxmox® is a registered trademark of Proxmox Server Solutions GmbH. cv4pve is developed by Corsinvest and is not a Proxmox product.
Copyright © Corsinvest Srl