Download the PHP package enterpriseve/eve2pve-api-php without Composer
On this page you can find all versions of the php package enterpriseve/eve2pve-api-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download enterpriseve/eve2pve-api-php
More information about enterpriseve/eve2pve-api-php
Files in enterpriseve/eve2pve-api-php
Package eve2pve-api-php
Short Description Corsinvest Proxmox VE Client API PHP
License GPL-3.0-only
Homepage https://github.com/Corsinvest/cv4pve-api-php
Informations about the package eve2pve-api-php
cv4pve-api-php
Proxmox VE Client API PHP
Copyright and License
Copyright: Corsinvest Srl For licensing details please visit LICENSE
Commercial Support
This software is part of a suite of tools called cv4pve-tools. If you want commercial support, visit the site
General
The client is generated from a JSON Api on Proxmox VE.
This PHP 5.4+ library allows you to interact with your Proxmox server via API. The client is generated from a JSON Api on Proxmox VE.
Result
The result is class Result and contain methods:
- getResponse() returned from Proxmox VE (data,errors,...) Object/Array
- responseInError (bool) : Contains errors from Proxmox VE.
- getStatusCode() (int) : Status code of the HTTP response.
- getReasonPhrase() (string): The reason phrase which typically is sent by servers together with the status code.
- isSuccessStatusCode() (bool) : Gets a value that indicates if the HTTP response was successful.
- getError() (string) : Get error.
- getResponseHeaders() (string) : Gets the raw HTTP headers associated with this response.
Main features
- Easy to learn
- No dependency external library only native curl
- Implementation respect the Api structure of Proxmox VE
- Method named
- Set ResponseType json, png
- Full method generated from documentation
- Comment any method and parameters
- Parameters indexed eg [n] is structured in array index and value
- Tree structure
- $client->getNodes()->get("pve1")->getQemu()->get(100)->getSnapshot()->snapshotList()->getResponse()->data
- Return data proxmox
- Return result
- Request
- Response
- Status
- Wait task finish task
- waitForTaskToFinish
- taskIsRunning
- getExitStatusTask
- Method direct access
- get
- set
- create
- delete
- Login return bool if access
- Return Result class more information
- Return object/array data
- default object disable from client.setResultIsObject(false)
- ClientBase lite function
- Form Proxmox VE 6.2 support Api Token for user
- Login with One-time password for Two-factor authentication.
- Set Timeout for the Connection.
Api token
From version 6.2 of Proxmox VE is possible to use Api token.
This feature permit execute Api without using user and password.
If using Privilege Separation when create api token remember specify in permission.
Format USER@REALM!TOKENID=TOKEN
(Usage example below)
Installation
Recommended installation is using [Composer], if you do not have [Composer] what are you waiting?
In the root of your project execute the following:
Or add this to your composer.json
Usage
Sample output version request:
The parameter indexed end with '[n]' in documentation (method createVM in Qemu parameter ide) require array whit key and value
Usage with API-token instead username/password
All versions of eve2pve-api-php with dependencies
lib-curl Version *