Get Service Bandwidth
This API is used to retrieve the data of bandwidth, aggregated in 5-minute or 1-day intervals.
Request
Request-Line
POST /cdn/v1.0/analytics/getBandwidthByServiceName HTTP/1.1
Request Parameters
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| serviceNames | Array | Mandatory | Array of service names, the max array size is 50. |
| startTime | String | Mandatory | Start time. Format varies by interval: • If the interval is minute, use yyyy-MM-ddTHH:mm:ssZ (e.g., 2024-01-15T14:30:00Z). • If interval is day, use yyyy-MM-ddT00:00:00Z (e.g., 2024-01-15T00:00:00Z). |
| endTime | String | Mandatory | End time. Format varies by interval: • If the interval is minute, use yyyy-MM-ddTHH:mm:ssZ (e.g., 2024-01-15T14:30:00Z). • If interval is day, use yyyy-MM-ddT00:00:00Z (e.g., 2024-01-15T00:00:00Z). |
| interval | String | Optional | Granularity of data points. Supported values: • minute (default) - Each data point represents 5 minutes. Time range cannot exceed 24 hours. • day - Each data point represents one day. Time range cannot exceed 90 days. |
Response
Response Body
| Property name | Type | Description |
|---|---|---|
| Array | Array of Service Bandwidth object. |
Object: Service Bandwidth
| Parameter | Type | Description |
|---|---|---|
| serviceName | String | Name of service. |
| bandwidths | Array | List of bandwidth data with 5-minute or 1-day intervals. Array of Bandwidth. |
Object: Bandwidth
| Parameter | Type | Description |
|---|---|---|
| timestamp | String | Timestamp in UTC, using the format yyyy-MM-ddTHH:mm:ssZ. |
| value | Float | Bandwidth value in bps. Example format: 94.33. |
Status Codes, Error Codes and Error Messages
| Status Code | Error Code | Error Message |
|---|---|---|
| 400 | Request.BadRequest | Bad request. |
| 400 | ServiceNames.Invalid | The list of service names is required and must contain valid names. |
| 400 | ServiceNames.NumberInvalid | Service names limit exceeded. |
| 400 | Time.Invalid | StartTime or EndTime is required. |
| 400 | IntervalType.Invalid | Interval type must be minute or day. |
| 400 | TimeFormat.Invalid | StartTime or EndTime must use the format yyyy-MM-ddTHH:mm:ssZ. |
| 400 | TimeRange.Exceeded | When interval is day, the time range between StartTime and EndTime cannot exceed 90 days. |
| 400 | TimeRange.Exceeded | When interval is minute, the time range between StartTime and EndTime cannot exceed 24 hours. |
| 400 | TimeRange.EndBeforeStart | EndTime must be later than StartTime. |
Examples
Get Service Bandwidth
Request
POST /cdn/v1.0/analytics/getBandwidthByServiceName HTTP/1.1
{
"serviceNames": [
"api53-1121-auto-test.activity04.com",
"api53-core-c-alisg.tiktokv.com"
],
"startTime": "2025-09-09T00:00:00Z",
"endTime": "2025-09-15T00:00:00Z",
"interval": "day"
}
Successful Response Body
[
{
"serviceName": "api53-1121-auto-test.activity04.com",
"bandwidths": [
{
"timestamp": "2025-09-09T00:00:00Z",
"value": 59.09
},
{
"timestamp": "2025-09-10T00:00:00Z",
"value": 1898.51
},
{
"timestamp": "2025-09-11T00:00:00Z",
"value": 9.17
},
{
"timestamp": "2025-09-12T00:00:00Z",
"value": 27.65
},
{
"timestamp": "2025-09-13T00:00:00Z",
"value": 2297.39
},
{
"timestamp": "2025-09-14T00:00:00Z",
"value": 9.17
}
]
},
{
"serviceName": "api53-core-c-alisg.tiktokv.com",
"bandwidths": [
{
"timestamp": "2025-09-09T00:00:00Z",
"value": 253517.25
},
{
"timestamp": "2025-09-10T00:00:00Z",
"value": 307859.47
},
{
"timestamp": "2025-09-11T00:00:00Z",
"value": 198267.04
},
{
"timestamp": "2025-09-12T00:00:00Z",
"value": 241347.79
},
{
"timestamp": "2025-09-13T00:00:00Z",
"value": 418538.92
},
{
"timestamp": "2025-09-14T00:00:00Z",
"value": 353247.18
}
]
}
]