Skip to content

Instantly share code, notes, and snippets.

@nickjj
Last active July 11, 2023 19:04
Show Gist options
  • Save nickjj/d63d1e0ee71f4226ac5000bf1022bb38 to your computer and use it in GitHub Desktop.
Save nickjj/d63d1e0ee71f4226ac5000bf1022bb38 to your computer and use it in GitHub Desktop.
List of DigitalOcean slugs for images, sizes and regions.
# Listed generated on 2021-08-07 at 3:45am EST
curl -s -X GET -H "Content-Type: application/json" \
-H "Authorization: Bearer ${DIGITALOCEAN_ACCESS_TOKEN}" \
"https://api.digitalocean.com/v2/images?page=1&per_page=100&type=distribution" \
| jq '.images[].slug' | sort
"centos-7-x64"
"centos-8-x64"
"centos-stream-8-x64"
"debian-10-x64"
"debian-9-x64"
"fedora-33-x64"
"fedora-34-x64"
"freebsd-11-x64-ufs"
"freebsd-11-x64-zfs"
"freebsd-12-x64-ufs"
"freebsd-12-x64-zfs"
"rancheros"
"rockylinux-8-x64"
"ubuntu-18-04-x64"
"ubuntu-20-04-x64"
"ubuntu-20-10-x64"
"ubuntu-21-04-x64"
# Listed generated on 2021-07-16 at 11:45am EST
curl -s -X GET -H "Content-Type: application/json" \
-H "Authorization: Bearer ${DIGITALOCEAN_ACCESS_TOKEN}" \
"https://api.digitalocean.com/v2/sizes?page=1&per_page=100" \
| jq '.sizes[].slug' | sort
"16gb"
"1gb"
"2gb"
"32gb"
"48gb"
"4gb"
"512mb"
"64gb"
"8gb"
"c-2"
"c-4"
"c-8"
"c-16"
"c-32"
"c-48"
"g-2vcpu-8gb"
"gd-2vcpu-8gb"
"m-128gb"
"m-16gb"
"m-1vcpu-8gb"
"m-224gb"
"m-2vcpu-16gb"
"m-32gb"
"m-64gb"
"m3-2vcpu-16gb"
"m6-2vcpu-16gb"
"s-12vcpu-48gb"
"s-16vcpu-64gb"
"s-1vcpu-1gb"
"s-1vcpu-2gb"
"s-1vcpu-3gb"
"s-20vcpu-96gb"
"s-24vcpu-128gb"
"s-2vcpu-2gb"
"s-2vcpu-4gb"
"s-32vcpu-192gb"
"s-3vcpu-1gb"
"s-4vcpu-8gb"
"s-6vcpu-16gb"
"s-8vcpu-32gb"
# Listed generated on 2021-08-07 at 3:45am EST
curl -s -X GET -H "Content-Type: application/json" \
-H "Authorization: Bearer ${DIGITALOCEAN_ACCESS_TOKEN}" \
"https://api.digitalocean.com/v2/regions?page=1&per_page=100" \
| jq '.regions[].slug' | sort
"ams2"
"ams3"
"blr1"
"fra1"
"lon1"
"nyc1"
"nyc2"
"nyc3"
"sfo1"
"sfo2"
"sfo3"
"sgp1"
"tor1"
@sergsoares
Copy link

sergsoares commented Aug 7, 2021

Very useful, thanks for share.

@NeCkEr
Copy link

NeCkEr commented Aug 27, 2021

Thanks for this.

@bukowa
Copy link

bukowa commented Oct 7, 2022

I made this with cron should be auto updated https://github.com/bukowa/digitalocean-images/ in case you cannot use api to gather this info.

Edit: i also found this https://slugs.do-api.dev/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment