Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 1.76 KB

File metadata and controls

54 lines (35 loc) · 1.76 KB

Hostinger\HostingDatacentersApi

All URIs are relative to https://developers.hostinger.com, except if the operation defines another base path.

Method HTTP request Description
listAvailableDatacentersV1() GET /api/hosting/v1/datacenters List available datacenters

listAvailableDatacentersV1()

listAvailableDatacentersV1($orderId): \Hostinger\Model\HostingV1DatacenterDatacenterResource[]

List available datacenters

Retrieve a list of datacenters available for setting up hosting plans based on available datacenter capacity and hosting plan of your order. The first item in the list is the best match for your specific order requirements.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Hostinger\Api\HostingDatacentersApi(config: $config);
$orderId = 123; // int | Order ID

try {
    $result = $apiInstance->listAvailableDatacentersV1($orderId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HostingDatacentersApi->listAvailableDatacentersV1: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
orderId int Order ID

Return type

\Hostinger\Model\HostingV1DatacenterDatacenterResource[]

[Back to top] [Back to API list] [Back to Model list] [Back to README]