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

# Get data by service

Returns information about a specified service ID's bandwidth data over a specified time period.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/bandwidth/service/{serviceId}": {
      "parameters": [
        {
          "description": "ID of Service to View",
          "in": "path",
          "name": "serviceId",
          "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": "Interval of data in seconds. Historical data is condensed, if provided value is smaller than existing steps for the date range the endpoint will return data with the smallest available step.",
          "in": "query",
          "name": "step",
          "required": true,
          "schema": {
            "type": "integer",
            "default": 300
          }
        },
        {
          "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": 1790630642
          }
        }
      ],
      "post": {
        "operationId": "post_service_id_bandwidth_resource",
        "parameters": [
          {
            "description": "An optional fields mask",
            "in": "header",
            "name": "X-Fields",
            "schema": {
              "type": "string",
              "format": "mask"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service Bandwidth Graph retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Bandwidth"
                  },
                  "type": "array"
                }
              }
            }
          },
          "400": {
            "description": "Unable to retrieve Bandwidth Graph for this Service."
          },
          "403": {
            "description": "You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission."
          }
        },
        "summary": "Get data by service",
        "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": {
      "Bandwidth": {
        "properties": {
          "bandwidthData": {
            "description": "Returns an array where each item contains a dictionary of data and an identifier for each requested interface. The data itself is an array of arrays where each item is the measurementat the requested `step` and the index of each integer value corresponds with the legend returned in the `metadata`.",
            "items": {
              "items": {
                "type": "number"
              },
              "type": "array"
            },
            "type": "array"
          },
          "interface": {
            "description": "The interface(s) displayed in the image.",
            "type": "string"
          },
          "metadata": {
            "description": "Returns metadata about the query including the 95th percentile values of the returned data, legend for returned data arrays, and query args passed to the query.",
            "type": "object"
          },
          "switchId": {
            "description": "The unique ID of the switch where bandwidth data is measured.",
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  }
}
```