Quantcast
Viewing latest article 1
Browse Latest Browse All 6

How the buyvm stallion/solusVM API works

So, after finally having found a decent VPS provider ( which I described here )
I would now like to access my 14 128′s via the API of the control panel, which is based on SolusVM.

Actually it is really simple, just take the following link if you are with buyvm.net :

https://manage.buyvm.net/api/client/command.php?key=$APIKEY&hash=$HASH&action=$ACTION&$FLAG=true&status=true

If you are with a different provider than buyvm, replace the domain.

$APIKEY = insert your API key

$HASH = insert your API hash

$ACTION = desired action, you can choose from:
reboot
boot
shutdown
status
info

$FLAG = returns the status of a desired component, you can choose from:
ipaddr
hdd
mem
bw

You might have to use “info” as $ACTION to use $FLAG.

Also you can add &status=true to the link to always get the status returned.

Now, how do you use the information? There is a script in the solusvm wiki that I think is a tad complicated and unnecessary, plus it does not work for me at all (I only get a blank page).
A much simpler method would be to do it with PHP, without the need of cURL:

<?php
$link = http://..link to API
$api = file_get_contents($link);
echo $api;
?>

And you are done! Admittedly, you could sort the returned information and return it more readable. I might add a function for that later on. Image may be NSFW.
Clik here to view.
;)

Find more information in the official SolusVM wiki: http://wiki.solusvm.com/index.php?title=API:Client

As usual, feel free to leave suggestions and questions in the comments.


Viewing latest article 1
Browse Latest Browse All 6

Trending Articles