---
updatedAt: 2026-05-27T19:42:41.000Z
agentTools:
  projectIndex: https://developers.hivelocity.net/llms.txt
---

# Get PNG by device

Returns a PNG graph in Base64 format including bandwidth data with b/s on the y axis and date/time on the x axis for the device ID and time period specified.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/bandwidth/device/{deviceId}/image": {
      "parameters": [
        {
          "description": "ID of Device to View",
          "in": "path",
          "name": "deviceId",
          "required": true,
          "schema": {
            "type": "integer"
          }
        },
        {
          "description": "Return data in the given period. Day, week, month will return the previous day, week, month from now.",
          "in": "query",
          "name": "period",
          "required": true,
          "schema": {
            "type": "string",
            "enum": [
              "day",
              "week",
              "month",
              "custom"
            ],
            "default": "day"
          }
        },
        {
          "description": "Network interface to get bandwidth usage from. eth0 and eth1 are your first and second nic respectively. If unsure use the public, private, and all values. Overages are billed on public traffic.",
          "in": "query",
          "name": "interface",
          "required": true,
          "schema": {
            "type": "string",
            "enum": [
              "eth0",
              "eth1",
              "public",
              "private",
              "all"
            ],
            "default": "eth0"
          }
        },
        {
          "description": "Start Time of Custom Time Period. (Unix Epoch Time)",
          "in": "query",
          "name": "start",
          "schema": {
            "type": "integer",
            "default": 0
          }
        },
        {
          "description": "End Time of Custom Time Period (Unix Epoch Time)",
          "in": "query",
          "name": "end",
          "schema": {
            "type": "integer",
            "default": 1794340637
          }
        }
      ],
      "post": {
        "operationId": "post_device_id_bandwidth_image_resource",
        "parameters": [
          {
            "description": "An optional fields mask",
            "in": "header",
            "name": "X-Fields",
            "schema": {
              "type": "string",
              "format": "mask"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Device Bandwidth Graph retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/BandwidthImage"
                  },
                  "type": "array"
                }
              }
            }
          },
          "400": {
            "description": "Unable to retrieve Bandwidth Graph for this Device."
          },
          "403": {
            "description": "You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission."
          }
        },
        "summary": "Get PNG by device",
        "tags": [
          "Bandwidth"
        ]
      }
    }
  },
  "info": {
    "description": "Interact with Hivelocity",
    "title": "Hivelocity API",
    "version": "2.0"
  },
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "description": "Request Bandwidth Data.",
      "name": "Bandwidth"
    }
  ],
  "servers": [
    {
      "url": "https://core.hivelocity.net/api/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "in": "header",
        "name": "X-API-KEY",
        "type": "apiKey"
      }
    },
    "schemas": {
      "BandwidthImage": {
        "properties": {
          "graphImage": {
            "description": "A PNG image of bandwidth usage.",
            "type": "string"
          },
          "interface": {
            "description": "The interface(s) displayed in the image.",
            "type": "string"
          },
          "switchId": {
            "description": "The unique ID of the switch where bandwidth data is measured.",
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  }
}
```