Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrkampf/proxmoxve
The is a PHP 8 ProxmoxVe API client. With it you can easily and quickly retrieve information from your Proxmox server or cluster.
https://github.com/mrkampf/proxmoxve
api api-client composer php php-library php7 php8 proxmox proxmox-api proxmox-apis proxmox-cluster proxmox-ve proxmoxve
Last synced: 6 days ago
JSON representation
The is a PHP 8 ProxmoxVe API client. With it you can easily and quickly retrieve information from your Proxmox server or cluster.
- Host: GitHub
- URL: https://github.com/mrkampf/proxmoxve
- Owner: MrKampf
- License: gpl-3.0
- Created: 2019-09-01T19:59:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-01T09:12:31.000Z (10 months ago)
- Last Synced: 2025-02-07T03:07:11.614Z (6 days ago)
- Topics: api, api-client, composer, php, php-library, php7, php8, proxmox, proxmox-api, proxmox-apis, proxmox-cluster, proxmox-ve, proxmoxve
- Language: PHP
- Homepage:
- Size: 387 KB
- Stars: 55
- Watchers: 3
- Forks: 26
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ProxmoxVE API
This **PHP 8+** Proxmox library allows, to interact with your Proxmox PVE server and cluster via API.[![Latest Stable Version](https://poser.pugx.org/mrkampf/proxmox-ve/v/stable)](https://packagist.org/packages/mrkampf/proxmox-ve)
[![Total Downloads](https://poser.pugx.org/mrkampf/proxmox-ve/downloads)](https://packagist.org/packages/mrkampf/proxmox-ve)
[![Latest Unstable Version](https://poser.pugx.org/mrkampf/proxmox-ve/v/unstable)](https://packagist.org/packages/mrkampf/proxmox-ve)
[![License](https://poser.pugx.org/mrkampf/proxmox-ve/license)](https://packagist.org/packages/mrkampf/proxmox-ve)> You find any errors, typos or you detect that something is not working as expected please open an [issue](https://github.com/MrKampf/proxmoxVE/issues/new). I'll try to release a fix asap.
## Getting Started
Recommended installation is using **Composer**. If you do not have **Composer**, what are you waiting for?
In the root of your project, execute the following:
```sh
$ composer require mrkampf/proxmox-ve
```Or add this to your `composer.json` file:
```json
{
"require": {
"mrkampf/proxmox-ve": "^0.4.4"
}
}
```Then perform the installation:
```sh
$ composer install --no-dev
```## Example
---
### From version 3.1```php
nodes()->get());// Read all LXC
print_r($proxmox->nodes()->lxc()->get());// Read all LXC for a node
print_r($proxmox->nodes()->node("node_name")->lxc()->get());// Read all qemu
print_r($proxmox->nodes()->qemu()->get());// Read all QEMU for a node
print_r($proxmox->nodes()->node("node_name")->qemu()->get());```
---
### API Token Support```php
nodes()->get());// Read all LXC
print_r($proxmox->nodes()->lxc()->get());// Read all LXC for a node
print_r($proxmox->nodes()->node("node_name")->lxc()->get());// Read all qemu
print_r($proxmox->nodes()->qemu()->get());// Read all QEMU for a node
print_r($proxmox->nodes()->node("node_name")->qemu()->get());```
---
### Example for lazy login```php
getApi()->login();// Read all nodes
print_r($proxmox->nodes()->get());```
---
### Example for custom http client```php
nodes()->get());```
---
### For version 3.1| WARNING: The array options is after version 3.0 no longer supported! |
| --- |```php
'127.0.0.1',
'username' => 'root',
'password' => 'example',
'authType' => 'pam',
'port' => '8006',
];// Then simply pass your credentials when creating the API client object.
$proxmox = new PVE($credentials);//Read all nodes
print_r($proxmox->nodes()->get());//Read all lxc
print_r($proxmox->nodes()->lxc()->get());//Read all qemu
print_r($proxmox->nodes()->qemu()->get());
```[LICENSE]:./LICENSE
[PVE2 API Documentation]:http://pve.proxmox.com/pve-docs/api-viewer/index.html
[ProxmoxVE API]:http://pve.proxmox.com/wiki/Proxmox_VE_API
[Proxmox wiki]:http://pve.proxmox.com/wiki
[Composer]:https://getcomposer.org/