I am using Digital Ocean and can advice them as good hosting provider. But DO also have unpleasant feature - you cant turn on autobackup if you did not choose it before creating VM. Fortunately Digital Ocean admin panel have ability to snapshot VM (but with reboot :() and I will show you how to backup VM at once with DO API.
So at first, as usual, you need to setup python library:
pip install -U python-digitalocean
We will use python wrapper for DO API. It is easier than use REST API. So let me show you some trivial examples:
Output:
gray.my.com
blabla.my.net
nagios.my.com
test.my.com