All Products
Search
Document Center

ApsaraVideo VOD:DescribeVodDomainTrafficData

Last Updated:Nov 09, 2022

Queries the network traffic for one or more specified domain names for CDN.

Operation Description

If you specify neither the StartTime parameter nor the EndTime parameter, the data in the last 24 hours is queried. Alternatively, you can specify both the StartTime and EndTime parameters to query data that is generated in the specified duration. You can query data for the last 90 days at most.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All resources is used in the Resource type column of the operation.
  • Condition keyword: refers to the condition keyword defined by the cloud product itself.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operateaccess levelResource typeconditional keywordAssociation operation
vod:DescribeVodDomainTrafficDataRead
  • VOD
    acs:vod:*:{#accountId}:*/*
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringNo

The domain name to be queried. If you do not specify this parameter, the merged data of all your domain names for CDN is returned. You can specify multiple domain names. Separate them with commas (,).

example.com
StartTimestringNo

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

NoteThe minimum query interval is 5 minutes. If you do not specify this parameter, the data in the last 24 hours is queried.
2019-01-20T13:59:58Z
EndTimestringNo

The end of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2019-01-20T14:59:58Z
IntervalstringNo

The query interval. Unit: seconds. Valid values: 300, 3600, and 86400. If you do not specify this parameter or the specified value is invalid, the default value is used.

  • If the time range to query is less than 3 days, valid values are 300, 3600, and 86400. The default value is 300.
  • If the time range to query is from 3 to less than 31 days, valid values are 3600 and 86400. The default value is 3600.
  • If the time range to query is from 31 to 90 days, the valid value is 86400.
300
IspNameEnstringNo

The name of the Internet service provider (ISP). If you do not specify this parameter, the data of all ISPs is returned.

Alibaba
LocationNameEnstringNo

The name of the region. If you do not specify this parameter, the data in all regions is returned. Only data in the China (Shanghai) region can be queried.

cn-shanghai

Response parameters

ParameterTypeDescriptionExample
object

The returned datas.

EndTimestring

The end of the time range in which data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2019-01-20T14:59:58Z
StartTimestring

The beginning of the time range in which data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2019-01-20T13:59:58Z
RequestIdstring

The ID of the request.

D94E471F-1A27-442E-552D-D4D2000C****
DomainNamestring

The domain name for CDN.

example.com
TotalTrafficstring

The total traffic.

5906662826
DataIntervalstring

The time interval between the returned entries. Unit: seconds.

3600
TrafficDataPerIntervalarray

The network traffic data that is collected for each interval.

object

The network traffic data that is collected for each interval.

HttpsDomesticValuestring

The volume of the HTTPS network traffic on L1 nodes in mainland China. Unit: byte.

0
Valuestring

The total volume of the network traffic. Unit: byte.

0
OverseasValuestring

The volume of the network traffic outside mainland China. Unit: byte.

0
HttpsValuestring

The total volume of the HTTPS network traffic on L1 nodes. Unit: byte.

0
HttpsOverseasValuestring

The volume of the HTTPS network traffic on L1 nodes outside mainland China. Unit: byte.

0
TimeStampstring

The timestamp of the returned data. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2019-01-15T19:00:00Z
DomesticValuestring

The volume of the network traffic in mainland China. Unit: byte.

0

Example

Normal return example

JSONFormat

{
  "EndTime": "2019-01-20T14:59:58Z",
  "StartTime": "2019-01-20T13:59:58Z",
  "RequestId": "D94E471F-1A27-442E-552D-D4D2000C****",
  "DomainName": "example.com",
  "TotalTraffic": "5906662826",
  "DataInterval": "3600",
  "TrafficDataPerInterval": [
    {
      "HttpsDomesticValue": "0",
      "Value": "0",
      "OverseasValue": "0",
      "HttpsValue": "0",
      "HttpsOverseasValue": "0",
      "TimeStamp": "2019-01-15T19:00:00Z",
      "DomesticValue": "0"
    }
  ]
}

Error codes

For a list of error codes, visit the API error center.

Common errors

The following table describes the common errors that this operation can return.

Error codeError messageHTTP status codeDescription
ThrottlingRequest was denied due to request throttling.503The error message returned because the request was denied due to throttling.
IllegalOperationIllegal domain, operation is not permitted.403The error message returned because the domain name is invalid.
OperationDeniedYour account does not open CDN service yet.403The error message returned because Alibaba Cloud CDN has not been activated for your Alibaba Cloud account.
OperationDeniedYour CDN service is suspended.403The error message returned because Alibaba Cloud CDN has been suspended for your Alibaba Cloud account.
InvalidDomain.NotFoundThe domain provided does not belong to you.404The error message returned because the domain name does not exist or does not belong to you.
InvalidDomain.OfflineThe domain provided is offline.404The error message returned because the domain name has been disabled.
ServiceBusyThe specified Domain is configuring, please retry later.403The error message returned because the domain name is being configured. Try again later.
InvalidDomain.Configure_failedFailed to configure the provided domain.500The error message returned because the system failed to configure the domain name.
MissingParameterStartTime and EndTime can not be single.400The error message returned because the StartTime and EndTime parameters have not been specified at the same time.
InvalidStartTime.MalformedSpecified start time is malformed.400The error message returned because the format of the start time is invalid.
InvalidEndTime.MalformedSpecified end time is malformed.400The error message returned because the format of the end time is invalid.
InvalidEndTime.MismatchSpecified end time does not match the specified start time.400The error message returned because the end time is earlier than the start time.
InvalidStartTime.ValueNotSupportedSpecified end time does not match the specified start time.400The error message returned because the time range that is specified by the EndTime and StartTime parameters exceeds 90 days.