Report this

What is the reason for this report?

Can I create a Debian 8 droplet via the API?

Posted on June 1, 2015

If I create a droplet from the control panel I can choose Debian 8 x64 but if I list all the images available from the API there is no Debian 8, only Debian 7 and 6. How do I create a Debian 8 droplet via the API?



This textbox defaults to using Markdown to format your answer.

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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

To create a Debian 8 Droplet via the API, you can use the slug debian-8-x64 or debian-8-x32 For example:

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $DO_TOKEN" \
    -d '{"name":"example","region":"nyc3","size":"512mb","image":"debian-8-x64"}' \
    "https://api.digitalocean.com/v2/droplets" 

The issue that you likely ran into was that lists returned via the API are paginated. By default, you only receive the first 25 items and need to make another call to receive the next page of results. You can request more items per page by appending ?per_page=200 to the URL in the call.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.