How to access droplet-specific bandwidth usage via API?

I am planning to create a managed hosting solution for my clients using DigitalOcean droplets. I could successfully go through all the operation/billing options using digitalocean API, except the overuse of bandwidth.

The digitalocean api does not provide metric tracking such as cpu usage, memory usage, and transfer.

I went through the following options options:

  1. Install DigitalOcean agent (, which may lead us to revoke the root access as the malicious customer might mess up the metric tracking. This might be the case of cloudways.

  2. Manually tracking metrics based on billing, which seems counterproductive.

I’m not sure about how Laravel Forge and ServerPilot tracks the bandwidth usage. Is there any other way to track them seamlessly while also granting root access to the user?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

DigitalOcean Employee
DigitalOcean Employee badge
November 17, 2021
Accepted Answer

Hey @sdriyaz712!

You should be able to access droplet specific, bandwidth, CPU and RAM usage through the api. It is available under the monitoring section here: Droplet Bandwidth API

That data should be able to be queried directly through the api without the need of the agent.

Hope it helps! Nate

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.