PHP 8.1 client for NetActuate vAPI2 and vAPI3.
composer require netactuate/naphpPass an API key when constructing a client, or set NETACTUATE_API_KEY.
use NetActuate\Naphp\Client;
use NetActuate\Naphp\V3Client;
$vapi2 = new Client();
$vapi3 = new V3Client();The key is sent as the platform key query parameter and is redacted from SDK error text.
Client talks to vAPI2, which covers cloud servers and DNS in this first release.
V3Client talks to vAPI3, which covers VPCs, storage buckets and NKE clusters in this first release.
Both clients accept an optional base URL for tests or private environments:
$client = new V3Client(apiKey: '...', baseUrl: 'https://vapi3.example');foreach ($client->listVpcs() as $vpc) {
echo $vpc->vpcId . ' ' . ($vpc->metadata['label'] ?? '') . PHP_EOL;
}
foreach ($client->listStorageBuckets() as $bucket) {
echo $bucket->bucketId . ' ' . ($bucket->metadata['label'] ?? '') . PHP_EOL;
}
foreach ($client->listNkeClusters() as $cluster) {
echo $cluster->clusterId . ' ' . $cluster->name . PHP_EOL;
}vAPI2:
getServers()getServer($id)listZones($type = '')getZone($id)listRecords($zoneId)getRecord($id)
vAPI3:
listVpcs()getVpc($id)listStorageBuckets()getStorageBucket($id)listNkeClusters()getNkeCluster($id)
The vAPI3 client follows all supported list envelope forms through pagination.
All failures raise NetActuate\Naphp\Exception\ApiError or a subclass.
NotFoundErroris raised for missing resources in both API versions.ContractErroris raised for contract gated capabilities.
Platform documentation lives at https://netactuate.com/docs.