Hey friend!

This API is currently under active development.

If you have suggestions or any feedback that we can use to improve our service, please do not hesitate to contact us. We value your opinion!


GET

List the availability of a dedicated server by country and model.

API Status: BETA

Parameter Value Data Type
country* The subsidiary country where the availability is requested string
hardwareModel The kind of hardware model which is requested string
{ }
Execution time: 00:00

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

use \LGHOST\Api\ApiClient;

try {
	
	$lghost = new ApiClient(
			[ 'key' => '', 'secret' => '' ], // Optional - For calls that need authentication
			'lghost-eu-v1', 				 // Requires - Valid region
			['debug' => false]);			 // Optional - Show debug messages
				
	$result = $lghost->GET('/dedicated/server/availabilities', [ 
            'country' => '' /** Country code */
			'hardwareModel' => '' /** Hardware model/reference */
		]);
			
	// Optional - Here we can check return as array, just specify true		
	$object = $result->json(false);
	
	// Optional - Here we can check for Code returned
	if($object->Code === 200)
	{
		print_r($object->availabilities);
	}
		
} catch (\LGHOST\Exceptions\InvalidParameterException $e) {
	((PHP_SAPI == 'cli') ? print("Caught " . $e->getMessage() . "\r\n") : print("Caught " . $e->getMessage() . " 

")); } catch (\LGHOST\Exceptions\HttpException $e) { ((PHP_SAPI == 'cli') ? print("Caught " . $e->getMessage() . "\r\n") : print("Caught " . $e->getMessage() . "

")); }
GET

List the operating systems available for a specified dedicated server.

API Status: PRODUCTION

Parameter Value Data Type
hardwareModel* Hardware model/reference string
{ }
Execution time: 00:00

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

use \LGHOST\Api\ApiClient;

try {
	
	$lghost = new ApiClient(
			[ 'key' => '', 'secret' => '' ], // Optional - For calls that need authentication
			'lghost-eu-v1', 				 // Requires - Valid region
			['debug' => false]);			 // Optional - Show debug messages
				
	$result = $lghost->GET('/dedicated/server/osAvailabilities', [ 
			'hardwareModel' => '' /** Hardware model/reference */
			]);
			
	// Optional - Here we can check return as array, just specify true		
	$object = $result->json(false);
	
	// Optional - Here we can check for Code returned
	if($object->Code === 200)
	{
		print_r($object->osAvailabilities);
	}
		
} catch (\LGHOST\Exceptions\InvalidParameterException $e) {
	((PHP_SAPI == 'cli') ? print("Caught " . $e->getMessage() . "\r\n") : print("Caught " . $e->getMessage() . " 

")); } catch (\LGHOST\Exceptions\HttpException $e) { ((PHP_SAPI == 'cli') ? print("Caught " . $e->getMessage() . "\r\n") : print("Caught " . $e->getMessage() . "

")); }