Skip to main content

Get Customer Bandwidth

This API is used to retrieve customer bandwidth data, aggregated in 5-minute or 1-day intervals.

Request

Request-Line

POST /cdn/v1.0/analytics/getBandwidthByCustomerId HTTP/1.1

Request Parameters

Body Parameters

ParameterTypeRequiredDescription
startTimeStringMandatoryStart time. If the interval is minute,use the format yyyy-MM-ddTHH:mm:ssZ.If the interval is day,use the format yyyy-MM-ddT00:00:00Z.
endTimeStringMandatoryEnd time. If the interval is minute,use the format yyyy-MM-ddTHH:mm:ssZ.If the interval is day,use the format yyyy-MM-ddT00:00:00Z.
intervalStringOptionalInterval of data spot, could be "minute", "day". For "minute", data spot is for 5 minutes, and for "day", data spot is one day. Default is "minute". Note: If interval = minute, the time range between start and end cannot exceed 24 hours. If interval = day, the time range cannot exceed 90 days.

Response

Response Body

ParameterTypeDescription
ArrayArray of serviceName Bandwidth.
Object: Bandwidth
ParameterTypeDescription
timestampStringSpecify in UTC using the format yyyy-MM-ddTHH:mm:ssZ. E.g., 2025-09-09T17:35:00Z will return data from 2025-09-09T17:35:00Z to 2025-09-09T17:39:59Z.
valueFloatDisplays the bandwidth value in bps. Example format: 94.33.

Status Codes, Error Codes and Error Messages

Status CodeError CodeError Message
400Request.BadRequestBad request.
400CustomerId.InvalidCustomer id is empty or invalid.
400IntervalType.InvalidInterval type must be minute or day.
400Time.InvalidStartTime or EndTime is required.
400IntervalType.InvalidInterval type must be minute or day.
400DayIntervalTimeFormat.InvalidStartTime or EndTime format in 'yyyy-MM-dd'T'00:00:00'Z''.
400MinuteIntervalTimeFormat.InvalidStartTime or EndTime format in 'yyyy-MM-dd'T'HH:mm:ss'Z''.
400TimeRange.ExceededThe difference between EndTime and StartTime cannot exceed 90 days.
400TimeRange.ExceededThe difference between EndTime and StartTime cannot exceed 24 hours.
400TimeRange.EndBeforeStartEnd time must be later than start time.
400GetBandwidth.OperationFailedGet Bandwidth failed.

Examples

Get Customer Bandwidth

Request

POST /cdn/v1.0/analytics/bandwidth HTTP/1.1

{
"startTime": "2025-11-06T00:00:00Z",
"endTime": "2025-11-08T00:00:00Z",
"interval": "day"
}

Successful Response Body

[
{
"timestamp": "2025-11-06T00:00:00Z",
"value": 1629855211515.04
},
{
"timestamp": "2025-11-07T00:00:00Z",
"value": 1595099605379.88
}
]