docs
api
Cloud Delivery(UCDN)
GetUcdnDomainBandwidthV2

Obtain domain bandwidth data [New] - GetUcdnDomainBandwidthV2

Overview

Obtain Domain Bandwidth Data (New)

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetUcdnDomainBandwidthV2.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
TypeintTime 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.NstringDomain ID, the ID generated when creating a domain. Default is all domains; Example (DomainId.0=ucdn-xxxxxx;DomainId.1=ucdn-xxxxxx)No
AreacodestringQuery bandwidth region 'cn' represents domestic, 'abroad' represents overseas. If not filled, the default is all regions.No
BeginTimeintThe 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
EndTimeintThe 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
ProtocolstringProtocol, http, https, websocket, quic. If not passed, the bandwidth of all protocols will be checked. Multiple protocols can be checked, separated by commas.No
PrimevalintOriginal bandwidth, if not 0 then get the original bandwidth, default is 0No
IsDcdnbooleanIs acceleration enabled for the entire site, default is falseNo

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
BandwidthTrafficListarray[BandwidthTrafficInfo]Bandwidth Information List, see BandwidthTrafficInfoNo

Data Model

BandwidthTrafficInfo

Field NameTypeDescription InformationRequired
TimeintYes
CdnBandwidthfloatYes
TrafficfloatYes

Example

Request Example

https://api.surfercloud.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
    }
  ],
  "RetCode": 0,
  "Traffic": 9.62935
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved