API Documentation

All of our services are also available via a REST-API for developers to automate your infrastructure administration.

Authentication

Use of the API requires API Authentication Credentials.

API Authentication Credentials can be generated within our control panel (https://mya.illyhosting.com), navigate to Services > API, find API Credentials section, there you can find your generated API Credentials (api_identifier and api_token).

Authenticating With API Credentials

API requests will be authenticated based on the request parameters "api_identifier" and "api_secret" as provisioned when Creating API Authentication Credentials under control panel (https://mya.illyhosting.com).

Example Request (CURL):

//API endpoint 
$apiurl = "https://api.illyhosting.com/";

//Post fields
$postfields = array( 
	'api_identifier' => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
	'api_secret' => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
	'service' => '', //select service
	'action' => '', //select action
);
 
//Call the API 
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
$response = curl_exec($ch);
if (curl_error($ch)) {
    die('Unable to connect: ' . curl_errno($ch) . ' - ' . curl_error($ch));
}
curl_close($ch);

// Decode response
$jsonData = json_decode($response, true);

// Dump array structure
print_r($jsonData);

A valid "api_identifier" and "api_secret" combination passed in this way will also result in successful authentication.