Skip to content

sKiLdUsT/proxmox-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proxmox VE API for PHP

Install

composer require armd-pro/proxmox-api

Proxmox API documentation

Example

require_once __DIR__ . '/vendor/autoload.php';

try {

    $client = new \ProxmoxApi\ProxmoxClient('127.0.0.1:8006', 'root', 'password', 'pam');
    $node = $client->node('proxmox'/* Node name */);
    $vm = $node->vm(100/* VM id */);
    
    print_r($vm->get('status/current'));
    
    /*$vm->set("resize", [
        'disk' => $vm->config()->bootdisk,
        'size' => "+1G"
    ]);*/
    
    // print_r($client->get('nodes'));
    // print_r($node->get('disks/list'));
    // print_r($vm->config());

} catch(\ProxmoxApi\ProxmoxApiException $e) {
    exit("Error: {$e->getMessage()}\n");
}

About

Proxmox VE API for PHP

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%