v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_Monitoring

Get Droplet Bandwidth Metrics

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).

get/v2/monitoring/metrics/droplet/bandwidth

Query parameters

host_idstring required

The droplet ID.

interface'private' | 'public' required

The network interface.

direction'inbound' | 'outbound' required

The traffic direction.

startstring required

UNIX timestamp to start metric window.

endstring required

UNIX timestamp to end metric window.

Response

The response will be a JSON object with a key called data and status.

status'success' | 'error' required

Example response

{
  "data": {
    "result": [
      {
        "metric": {
          "host_id": "19201920"
        },
        "values": [
          [
            1435781430,
            "1"
          ],
          [
            1435781445,
            "1"
          ]
        ]
      }
    ],
    "resultType": "matrix"
  },
  "status": "success"
}