By BillB
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!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.