docs
api
Cloud Delivery(UCDN)
get_new_ucdn_domain_bandwidth

[To be taken offline] Obtain domain bandwidth data - GetNewUcdnDomainBandwidth

Overview

Obtain domain bandwidth data

💡 This interface is about to be deprecated, use GetUcdnDomainBandwidthV2 to get domain bandwidth data.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetNewUcdnDomainBandwidth.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, and the sub-account 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)Yes
DomainId.NstringDomain ID, the ID generated when creating a domain. Default to all domains.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

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
BandwidthListarray[BandwidthInfo]Bandwidth Information List, see BandwidthInfoNo
TrafficfloatThe total CDN traffic used from the start time to the end time, unit GB.No

Data Model

BandwidthInfo

Field NameTypeDescription InformationRequired
TimeintTime point for bandwidth acquisition. Format: TimestampNo
CdnBandwidthfloatThe 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.No

Example

Request Example

https://api.surfercloud.com/?Action=GetNewUcdnDomainBandwidth
&ProjectId=org-xxxxx
&DomainId.n=KrgnhdNW
&Areacode=nallEbvw
&BeginTime=1
&EndTime=9
&Type=6

Response Example

{
  "Action": "GetNewUcdnDomainBandwidthResponse",
  "BandwidthList": [
    {
      "CdnBandwidth": 7.16981,
      "OriginBandwidth": 6.21946,
      "Time": 6
    },
    {
      "CdnBandwidth": 9.33524,
      "OriginBandwidth": 5.85159,
      "Time": 6
    },
    {
      "CdnBandwidth": 5.84444,
      "OriginBandwidth": 5.55357,
      "Time": 3
    }
  ],
  "RetCode": 0,
  "Traffic": 8.33753
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved