pydo.monitoring.get_droplet_bandwidth_metrics()

Generated on 3 Aug 2026 from pydo version v0.40.0

Usage

client.monitoring.get_droplet_bandwidth_metrics(
    host_id="17209102",
    interface="private",
    direction="inbound",
    start="1620683817",
    end="1620705417",
)
Returns JSONRaises HttpResponseError

Description

To retrieve bandwidth metrics for a given Droplet, send a GET request to /v2/monitoring/metrics/droplet/bandwidth. Use the interface query parameter to specify if the results should be for the private or public interface. Use the direction query parameter to specify if the results should be for inbound or outbound traffic. The metrics in the response body are in megabits per second (Mbps).

Parameters

host_id string required

The droplet ID.

interface string required

The network interface.

One of: private, public

direction string required

The traffic direction.

One of: inbound, outbound

start string required

UNIX timestamp to start metric window.

end string required

UNIX timestamp to end metric window.

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

resp = client.monitoring.get_droplet_bandwidth_metrics(alert_uuid="dfa8da", host_id="17209102", interface="private", direction="inbound", start="1620683817", end="1620705417")

Response Example

Show Response Example
{
  "status": "success",
  "data": {
    "resultType": "matrix",
    "result": [
      {
        "metric": {
          "direction": "inbound",
          "host_id": "222651441",
          "interface": "private"
        },
        "values": [
          [
            1634052360,
            "0.016600450090265357"
          ],
          [
            1634052480,
            "0.015085955677299055"
          ],
          [
            1634052600,
            "0.014941163855322308"
          ],
          [
            1634052720,
            "0.016214285714285712"
          ]
        ]
      }
    ]
  }
}

More Information

See /v2/monitoring/metrics/droplet/bandwidth in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.