Obtain domain bandwidth data [New] - GetUcdnDomainBandwidthV2
Overview
Obtain Domain Bandwidth Data (New)
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetUcdnDomainBandwidthV2 . | Yes |
PublicKey | string | The user’s public key can be obtained from Console  | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
Type | int | Time granularity (0 represents a granularity of 5 minutes, 1 represents a granularity of 1 hour, 2 represents a granularity of one day, 3 represents a granularity of 1 minute) | No |
DomainId.N | string | Domain ID, the ID generated when creating a domain. Default is all domains; Example (DomainId.0=ucdn-xxxxxx;DomainId.1=ucdn-xxxxxx) | No |
Areacode | string | Query Bandwidth Area cn=Domestic Total abroad=Overseas Total | No |
BeginTime | int | The start time of the query, formatted as Unix Timestamp. If there is an EndTime, BeginTime must be assigned. If not assigned, a missing parameter error will be returned. If there is no EndTime, BeginTime can also be unassigned. The default EndTime is the current time, and the default BeginTime is the current time of the previous day. | No |
EndTime | int | The end time of the query, in Unix Timestamp format. EndTime defaults to the current time, and BeginTime defaults to the time one day before the current time. | No |
Protocol | string | Protocol, when IsDcdn is false, can only pass http or https, or not pass to represent all. When IsDcdn is true, one or more of http, https, websocket, quic can be passed, separated by commas, if not passed, all protocol bandwidths are checked. | No |
Primeval | int | Original bandwidth, if not 0 then get the original bandwidth, default is 0 | No |
IsDcdn | boolean | Whether to accelerate the entire site, default is false. When it is true, it does not support foreign regional divisions. | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
BandwidthTrafficList | array[BandwidthTrafficInfo] | Bandwidth Information List, see BandwidthTrafficInfo | No |
RadixCn | int | cn traffic radix, values ​​are 1000 or 1024 | No |
RadixAbroad | int | abroad traffic radix, values ​​are 1000 or 1024 | No |
Data Model
BandwidthTrafficInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
Time | int | Time point for bandwidth acquisition. Format: Timestamp | Yes |
CdnBandwidth | float | The return value is the peak bandwidth of CDN within the specified time interval, in Mbps. If the request parameter Type is 0, then Value is the bandwidth value with a granularity of five minutes. If Type is 1, then Value is the peak bandwidth for 1 hour. If Type is 2, then Value is the peak bandwidth within a day. | Yes |
Traffic | float | Traffic corresponding to the time granularity, unit in bytes | Yes |
Example
Request Example
https://api.ucloud-global.com/?Action=GetUcdnDomainBandwidthV2
&ProjectId=MUfGPjvm
&Type=2
&DomainId.n=BxkCuDkr
&Areacode=dozcOivh
&BeginTime=7
&EndTime=6
&Protocol=DhcMWkkj
&Primeval=2
&IsDcdn=false
Response Example
{
"Action": "GetUcdnDomainBandwidthV2Response",
"BandwidthTrafficList": [
{
"Bandwidth": 1.23565,
"Time": 9,
"Traffic": 6.68386
}
],
"RadixAbroad": 9,
"RadixCn": 9,
"RetCode": 0,
"Traffic": 9.62935
}