Problems powering off droplet.

May 19, 2013 12.4k views
I want to create a snapshot of my droplet, but I can't power off the droplet. I have this api command, and I have a client id and api key, but how can I find out the ID of my droplet? My droplet has the name I gave it, but I can't find its ID anywhere. Also, I'm on Windows using putty to ssh to my droplet. After logging in, do I execute the api command there? Or do I execute the command in the browser? I ask this because the api commands start with https. Thanks in advance! https://api.digitalocean.com/droplets/DROPLET_ID/power_off/?client_id=CLIENT_IS&api_key=API_KEY
7 Answers
I only have one droplet, so if I assume the ID is 1 then I get this error message in putty:
No such file or directory
Figured out that I first have to execute this to get my droplet ID:

https://api.digitalocean.com/droplets/?client_id=CLIENT_IS&api_key=API_KEY

And I can do this in the browser, and see the droplet ID in the response in Firebug.
Glad you figured it out -- is there anything else you need help with in regards to the API?
On Ubuntu Server 12.04, how do we poweroff our droplet from the command line, for purposes of taking a snapshot?
@Pablo: you can run the "poweroff" command, or "shutdown -h now" - both should work.
@Kamal; thanks!
... and to reboot, you should run the "reboot" command.
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!