Enter in the Serverlove API. It has a standard REST API which accepts JSON or text commands, check the site for details. For testing (and execution) I have installed Curl for Windows. I spent quite a while trying to get the right call and Curl options, which was failing as the server "name" is actually a massive long string of numbers on the settings page, not actually the "name" of it, so the call kept failing. After the usual belligerent attempts, the 5 minute break then reading the instructions I managed to get Curl to make successful calls to turn on and off the servers, on demand! Yay. It looks a bit like this from the command line:
curl -v -i -H "Accept: application/json" -H "Content-Type: application/json" -u username:password -X POST -k https://api.z1-man.serverlove.com/servers/SERVER/start
It is actually pretty straightforward - there is quite a good API there if you need to do remotey-on-demandy things to servers etc. My tip is where the url says," .../servers/SERVER/start", then insert the servers UID.
No comments:
Post a comment
Found this pointless and feel you must comment? Really, there is no need, we are fully aware of the pointlessness of this article. But if you must...