GET
/dashboard/service/{id}/dedicated/bandwidth Get bandwidth usage
Returns bandwidth usage data with time series points for the specified period. Data is clamped to the service creation date.
Parameters
| Name | Type | In | Description |
|---|---|---|---|
id* | integer | path | The service ID of the dedicated server |
period | day | week | month | year | query | Time period for bandwidth data
Default: "day" |
Response
200
403
404
successbooleandataobjectpointsarraymonthlyUsageGBnumberMonthly bandwidth usage in gigabytes
monthlyUsageTBnumberMonthly bandwidth usage in terabytes
monthlyLimitTBnumbernullableMonthly bandwidth limit in terabytes
Request
curl -X GET "https://api.royalehosting.net/dashboard/service/{id}/dedicated/bandwidth" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-organization-id: YOUR_ORG_ID"Request
const response = await fetch("https://api.royalehosting.net/dashboard/service/{id}/dedicated/bandwidth", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
},
});
const data = await response.json();Request
import requests
response = requests.get(
"https://api.royalehosting.net/dashboard/service/{id}/dedicated/bandwidth",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
}
)
print(response.json())Response
{
"success": true,
"data": {
"points": [
{
"time": 1704067200,
"netin": 1048576,
"netout": 2097152
}
],
"monthlyUsageGB": 150.25,
"monthlyUsageTB": 0.15,
"monthlyLimitTB": 10
}
}