How to identify the same sizes as are available through the web interface

March 27, 2019 318 views
API

When I list the sizes available, I get many more options than what the standard web interface shows (I've included the NYC1 sizes in this post). Through the web interface, I can determine that it appears the sizes prefixed with s-, g-, or c- are "current". However, there are other sizes listed as well. Are these valid sizes? Is there a more in depth description of them? My initial thoughts were that they are old hardware configurations that wouldn't be available, but they have "available" listed as true.

How do I reduce this to the latest available droplets without resorting to hard coding the various prefixes and searching that way?

            "32gb",
            "16gb",
            "2gb",
            "1gb",
            "4gb",
            "8gb",
            "512mb",
            "64gb",
            "48gb",
            "c-16",
            "s-1vcpu-3gb",
            "c-32",
            "c-2",
            "c-4",
            "c-8",
            "m-1vcpu-8gb",
            "m-16gb",
            "m-32gb",
            "m-64gb",
            "m-128gb",
            "m-224gb",
            "s-1vcpu-1gb",
            "s-1vcpu-2gb",
            "s-2vcpu-2gb",
            "s-3vcpu-1gb",
            "s-2vcpu-4gb",
            "s-4vcpu-8gb",
            "s-6vcpu-16gb",
            "s-8vcpu-32gb",
            "s-12vcpu-48gb",
            "s-16vcpu-64gb",
            "s-20vcpu-96gb",
            "s-24vcpu-128gb",
            "s-32vcpu-192gb",
            "g-2vcpu-8gb",
            "g-4vcpu-16gb",
            "g-8vcpu-32gb",
            "g-16vcpu-64gb",
            "g-32vcpu-128gb",
            "gd-2vcpu-8gb",
            "gd-4vcpu-16gb",
            "gd-8vcpu-32gb",
            "gd-16vcpu-64gb",
            "gd-32vcpu-128gb",
            "gd-40vcpu-160gb"
1 Answer
jarland MOD March 27, 2019
Accepted Answer

Greetings!

Great question. You can obtain more information about the sizes over our API using this guide:

https://developers.digitalocean.com/documentation/v2/#list-all-sizes

You can also take a look at how they line up with the listings here:

https://www.digitalocean.com/pricing/

Jarland

  • I think you're missing the point of the API and doing things automatically. Put another way, why does the API list a bunch of sizes as available when they don't show up on the website?

    • The 512mb was left for a few that still wanted it (and the droplets still exist for those who never upgraded it), but we upgraded that to the 1GB standard droplet earlier last year. The only others that you don't see on the website were our high memory plans, those slugs still exist because the droplets that were created under them still exist (making it a vital data point). While they are not present on the website at this time, they are intended to return at a later date.

      The sizes are intended to represent droplets that exist, not necessarily those that are available for create. Those are listed under regions for available sizes.

      Imagine if you had one of the droplets that are listed there and wanted to perform automation against it to determine available memory of your droplets, but it had been removed simply because a new one could not be created. Different automation cases have different requirements.

      • Does that imply then that any droplet size in the list is creatable, as indicated by the available property being true?

        • That should indicate that they are available for create.

          I may have overlooked one thing though. I'm not seeing the "m-" (high memory) droplets under /v2/sizes. Can you clarify how those were pulled?

          • That particular extract came from /v2/regions (and therein lies my issue...what you see from regions doesn't match what you see from sizes).

            {  
                "regions":[  
                    {  
                        "name":"New York 1",
                        "slug":"nyc1",
                        "features":[  
                            "private_networking",
                            "backups",
                            "ipv6",
                            "metadata",
                            "install_agent",
                            "storage",
                            "image_transfer"
                        ],
                        "available":true,
                        "sizes":[  
                            "32gb",
                            "16gb",
                            "2gb",
                            "1gb",
                            "4gb",
                            "8gb",
                            "512mb",
                            "64gb",
                            "48gb",
                            "c-16",
                            "s-1vcpu-3gb",
                            "c-32",
                            "c-2",
                            "c-4",
                            "c-8",
                            "m-1vcpu-8gb",
                            "m-16gb",
                            "m-32gb",
                            "m-64gb",
                            "m-128gb",
                            "m-224gb",
                            "s-1vcpu-1gb",
                            "s-1vcpu-2gb",
                            "s-2vcpu-2gb",
                            "s-3vcpu-1gb",
                            "s-2vcpu-4gb",
                            "s-4vcpu-8gb",
                            "s-6vcpu-16gb",
                            "s-8vcpu-32gb",
                            "s-12vcpu-48gb",
                            "s-16vcpu-64gb",
                            "s-20vcpu-96gb",
                            "s-24vcpu-128gb",
                            "s-32vcpu-192gb",
                            "g-2vcpu-8gb",
                            "g-4vcpu-16gb",
                            "g-8vcpu-32gb",
                            "g-16vcpu-64gb",
                            "g-32vcpu-128gb",
                            "gd-2vcpu-8gb",
                            "gd-4vcpu-16gb",
                            "gd-8vcpu-32gb",
                            "gd-16vcpu-64gb",
                            "gd-32vcpu-128gb",
                            "gd-40vcpu-160gb"
                        ]
                    },
            
          • Thank you for that @CanadaGuy. I think some of that might not be intentional, though NYC1 is in a unique state where it is only available for people who already have a droplet there. This was not a situation we saw ahead for with our API.

            I will send some feedback to our engineers based on our discussion here.

          • Here is the TOR1 dump which I think has somewhat similar issue. Maybe I'm interpreting things wrong however.

            {  
                        "name":"Toronto 1",
                        "slug":"tor1",
                        "features":[  
                            "private_networking",
                            "backups",
                            "ipv6",
                            "metadata",
                            "install_agent",
                            "storage",
                            "image_transfer"
                        ],
                        "available":true,
                        "sizes":[  
                            "32gb",
                            "16gb",
                            "2gb",
                            "1gb",
                            "4gb",
                            "8gb",
                            "512mb",
                            "64gb",
                            "48gb",
                            "c-16",
                            "s-1vcpu-3gb",
                            "c-32",
                            "c-2",
                            "c-4",
                            "c-8",
                            "m-1vcpu-8gb",
                            "m-16gb",
                            "m-32gb",
                            "m-64gb",
                            "m-128gb",
                            "m-224gb",
                            "s-1vcpu-1gb",
                            "s-1vcpu-2gb",
                            "s-2vcpu-2gb",
                            "s-3vcpu-1gb",
                            "s-2vcpu-4gb",
                            "s-4vcpu-8gb",
                            "s-6vcpu-16gb",
                            "s-8vcpu-32gb",
                            "s-12vcpu-48gb",
                            "s-16vcpu-64gb",
                            "s-20vcpu-96gb",
                            "s-24vcpu-128gb",
                            "s-32vcpu-192gb"
                        ]
                    },
            
        • I just took some of your feedback to our product team, and I have a couple of things to share back:

          1. The high memory droplets which are not listed on the site, these actually can still be created over the API. No ETA on listing them publicly, and as you can see they're not available just anywhere. Those are the "m-" slugs. I was mistaken in saying that they were no longer available, I didn't realize we had re-enabled creates on them.

          2. The region listing in /v2/sizes, where each size lists all regions, is currently a bug. This should only list the regions in which that size can currently be created. No ETA right now, but it is on the list of things to be fixed.

Have another answer? Share your knowledge.