All URIs are relative to https://developers.hostinger.com, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| getDataCenterListV1() | GET /api/vps/v1/data-centers | Get data center list |
getDataCenterListV1(): \Hostinger\Model\VPSV1DataCenterDataCenterResource[]Get data center list
Retrieve all available data centers. Use this endpoint to view location options before deploying VPS instances.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\VPSDataCentersApi(config: $config);
try {
$result = $apiInstance->getDataCenterListV1();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling VPSDataCentersApi->getDataCenterListV1: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
\Hostinger\Model\VPSV1DataCenterDataCenterResource[]
[Back to top] [Back to API list] [Back to Model list] [Back to README]