1. Go to this page and download the library: Download client-api/pdm library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
client-api / pdm example snippets
ClientApi\Pdm\Configuration;
use ClientApi\Pdm\Pve;
$cfg = Configuration::getDefaultConfiguration()
->setHost('https://pdm1.example.com:8443/api2/json')
->setApiKey('Authorization', 'PDMAPIToken=user@realm!tokenid:uuid-secret');
$pve = new Pdm($cfg);
// Per-tag accessors are lazily instantiated and share the same Configuration.
$status = $pdm->qemu()->qemuVmStatus(node: 'pdm1', vmid: 100);
$nodes = $pdm->nodes()->nodesGetNodes();