docs
api
Cloud Delivery(UCDN)
get_ucdn_domain_traffic

[To be offline] Retrieve accelerated domain traffic usage information - GetUcdnDomainTraffic

Overview

Obtain the usage information of the accelerated domain name

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

ℹ️ Note
The traffic usage data is retained for a maximum of 3 months.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetUcdnDomainTraffic.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
AccountTypestringSpecify whether to query by project or by the entire account. The value 'top' means to query by the entire account, and the value 'org' means to query by project.No
DomainId.NstringDomain ID, generated when creating an accelerated domain, n starts from the natural number 0. Default all domains.No
AreacodestringThe query traffic area 'cn' represents domestic, 'abroad' represents overseas, the default is all areas.No
BeginTimeintThe start date of the query, in Unix Timestamp format. If there is an EndTime, BeginTime must be assigned.No
EndTimeintThe end date of the query, formatted as Unix Timestamp. EndTime defaults to the current time, while BeginTime defaults to 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
TrafficSetarray[UcdnDomainTrafficSet]Traffic instance table, see UcdnDomainTrafficSet for specific structure.No

Data Model

UcdnDomainTrafficSet

Field NameTypeDescription InformationRequired
TimeintThe time point of traffic acquisition, formatted as Unix Timestamp.No
ValuefloatQuery the total daily traffic, unit: GBNo

Example

Request Example

http://api.surfercloud.com/?Action=GetUcdnDomainTraffic
&ProjectId=org-xxxxx
&DomainId.0=ucdn-xxx
&BeginTime=1420992000
&EndTime=1421166064
&Areacode=cn
&AccountType=CjFxZeTe
&AccountType=THIOdFPl

Response Example

{
  " TrafficSet": [
    {
      "Time": " 1399305600",
      "Value": 10.08
    },
    {
      "Time": " 1399392000",
      "Value": 10.08
    },
    {
      "Time": " 1399392000",
      "Value": 10.08
    }
  ],
  "Action": "GetUcdnDomainTrafficResponse",
  "RetCode": 0
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved