DO Ideas 2

Expose additional meta data about server sizes in API

Right now the sizes api call only returns the size_id and the size_name. It would be helpful if more information was included like the amount of disk space and number of cpu cores.

  • Josh Frye
  • Sep 11 2018
  • Shipped
  • Sep 11, 2018

    Admin Response

    Hi! We’ve recently release version 2 of our API into public beta. Much more information is now available through the sizes endpoint. This includes: memory, vcpus, disk, price_monthly, and price_hourly Check out the documentation at: https://developers.digitalocean.com/v2/#sizes While the beta is on-going, we’re looking for as much feedback as possible. If there’s anything else you’d like to see in the API, please open an issue over on our GitHub page: http://do.co/APIv2_feedback Thanks!
  • Attach files
  • AoK commented
    September 11, 2018 19:01

    How do I programmatically determine what sizes are available for specific region via the DO API? For example, at the time of this question, "New York 1" doesn't allow droplet sizes 16 GB / 8 CPU or greater. There is no (documented) "by region" filter option in the DO GET /size API. Trial and error with DO GET /droplets/new and ratcheting down the size until one works seems a bit much.

    (Kamal Nasser requested I cross over the above request to this particular API request and vote for it - done).

    fyi, sizes API currently returns (example):
    [{"id":66,"name":"512MB","slug":null,"memory":512,"cpu":1,"disk":20,"cost_per_hour":0.00744,"cost_per_month":"5.0"}, ...
    For each size (which may or may not be available at your region of choice!)

  • Josh Frye commented
    September 11, 2018 19:01

    I didn't realize there was individual size calls. The docs lack that bit of info but I should have tried it first knowing it follows the rest pattern. I'll check it out but if I can get all the details from a #show call then that will work :)

  • Moisey Uretsky commented
    September 11, 2018 19:01

    Right now you can do a request on a particular size to get all of that data but we can expose it on the regular sizes call, would that be easier?