Hello, Does anyone have any ideas for getting accounting information via the API? As our droplets increase it would be great to have a way of pinging the API for costings. We could then use that information to build a local dashboard that refreshes every so often. At the moment, every time a droplet is built, via the API or otherwise, somebody has to manually record the costing in a local spreadsheet - seems a bit stone age!
Thanks
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!
I don’t think there is billing API available.
But you can find a work around. If you want just to calculate how much Droplets will cost you monthly, use API to fetch all Droplets. Then based on size calculate how much each will cost and sum it.
If you want real-time stats you can do that too.
Fetch all Droplets. List has Created at which will tell you when you created.
Calculate how much hours passed for that month. Don't forget that Droplets are charged for 672 hours per month.
Now you have real time stats whenever you need.
Don’t forget Snapshots, Backups and Block Storage if you use it.
Great, thanks for the replies. I think I could also make use of Tags (provided they were created with the correct information on droplet creation) and sum the values that way.
Lots for me to try, thanks.
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.