Question

Where are the images list?

  • Posted June 28, 2013

I was looking for the ID’s of the different distros… I couldn’t find it for using the API to rebuild my servers… Any help?

Subscribe
Share

Submit an 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.

Use /v2/images except that this only shows 20 per page by default, so use per_page= to get the list on one page. Here is the full URL:

https://api.digitalocean.com/v2/images?per_page=999

So with curl, use something like:

curl -X GET --silent "https://api.digitalocean.com/v2/images?per_page=999" -H "Authorization: Bearer $TOKEN" |jq '.'

If you have Tugboat installed:

tugboat images -g

The images aren’t in alphabetical order, however. So if you want to find all CentOS images, you can combine this command with grep like so:

tugboat images -g | grep -i centos

The above command gives (as of March 7 2015) the following output:

5.10 x64 (id: 6372321, distro: CentOS)
5.10 x32 (id: 6372425, distro: CentOS)
7 x64 (id: 10322623, distro: CentOS)
6.5 x64 (id: 10325922, distro: CentOS)
6.5 x32 (id: 10325992, distro: CentOS)

Hello Kamal, <br>We are looking for an easy way to find the image id value for each image in each region. <br> <br>If anyone is interested in the Precise x64 image in San Francisco 1 (region 4), the image id is 3101045. <br> <br>I found the value i needed by using Chrome inspect element similar to the Firebug approach for Firefox that mczylok used. <br> <br>There needs to be an easier way to get this information for folks who want to use APIs. <br> <br>Thank you.

Install doctl

Run:

$ doctl compute image list

Thanks for that malist.

After a little playing around I found out how to prettify it: curl -X GET “https://api.digitalocean.com/v2/images” -H “Authorization: Bearer $TOKEN” | python -mjson.tool | less

and then - when I still couldn’t find the Debian7 x64 image name I was looking for, that I needed to call two more pages in sequence. So:

curl -X GET “https://api.digitalocean.com/v2/images?page=2” -H “Authorization: Bearer $TOKEN” | python -mjson.tool | less

and

curl -X GET “https://api.digitalocean.com/v2/images?page=3” -H “Authorization: Bearer $TOKEN” | python -mjson.tool | less

Hope that helps someone.

Lee

First, get a Personal Access Token (click on Apps & API button on the main DO console), then use the following curl command.

curl -X GET “https://api.digitalocean.com/v2/images” -H “Authorization: Bearer $TOKEN”

Here you have (to get it i use firebug on rebuild section) <br>361740 Arch Linux 2013.05 x32 <br>350424 Arch Linux 2013.05 x64 <br>1602 CentOS 5.8 x32 <br>1601 CentOS 5.8 x64 <br>376568 CentOS 6.4 x32 <br>562354 CentOS 6.4 x64 <br>3102733 CentOS 6.5 x32 <br>3102789 CentOS 6.5 x64 <br>12575 Debian 6.0 x32 <br>12573 Debian 6.0 x64 <br>3102384 Debian 7.0 x32 <br>3102387 Debian 7.0 x64 <br>3104894 Docker 0.10 on Ubuntu 13.10 x64 <br>3140202 Dokku-v0.2.1 on Ubuntu 13.04 <br>32387 Fedora 17 x32 <br>32399 Fedora 17 x32 Desktop <br>32428 Fedora 17 x64 <br>32419 Fedora 17 x64 Desktop <br>3102721 Fedora 19 x32 <br>3102879 Fedora 19 x64 <br>3121555 Ghost 0.4.2 on Ubuntu 12.04 <br>3118238 GitLab 6.6.5 CE <br>3120115 LAMP on Ubuntu 12.04 <br>3118235 MEAN on Ubuntu 12.04.4 <br>3137903 Redmine on Ubuntu 12.04 <br>3137635 Ruby on Rails on Ubuntu 12.10 (Nginx + Unicorn) <br>14098 Ubuntu 10.04 x32 <br>14097 Ubuntu 10.04 x64 <br>3100616 Ubuntu 12.04.4 x32 <br>3101045 Ubuntu 12.04.4 x64 <br>3101888 Ubuntu 12.10 x32 <br>3101891 Ubuntu 12.10 x64 <br>3104282 Ubuntu 12.10 x64 Desktop <br>3101580 Ubuntu 13.10 x32 <br>3101918 Ubuntu 13.10 x64 <br>3135725 Wordpress on Ubuntu 13.10

I also need this…