Queries the traffic data that is collected in real time for one or more domain names.
Usage notes
You can call this operation to query the real-time traffic in a region for an Internet service provider (ISP) within a specified period of time under one or more streaming domains.
If you do not specify the StartTime parameter or the EndTime parameter, the data of the last hour is returned. You can specify both the StartTime and EndTime parameters to query the data of a specified time range.
This operation is called to monitor data. The data is collected and processed in a manner different from that for billing. Therefore, the data that is returned by this operation cannot be used as a reference to calculate the resource usage for billing.
You can query data in the last 90 days.
QPS limit
This operation does not have a queries per second (QPS) limit on a single user. You can call this operation based on your business requirements. For more information, see QPS limits.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | DescribeLiveDomainRealTimeTrafficData | The operation that you want to perform. Set the value to DescribeLiveDomainRealTimeTrafficData. |
DomainName | String | Yes | example.com,example.aliyundoc.com | The streaming domain. Separate multiple streaming domains with commas (,). |
StartTime | String | No | 2015-12-10T15:00:00Z | 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. Note If you do not specify this parameter, the data of the last hour is returned. |
IspNameEn | String | No | alibaba | The name of the ISP. You can call the DescribeCdnRegionAndIsp operation to query a list of available ISPs. |
LocationNameEn | String | No | tianjin | The name of the region. You can call the DescribeCdnRegionAndIsp operation to query a list of available regions. |
EndTime | String | No | 2015-12-10T15:01:00Z | 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. |
Response parameters
Parameter | Type | Example | Description |
EndTime | String | 2015-12-10T15:01:00Z | The end of the time range during 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. |
StartTime | String | 2015-12-10T15:00:00Z | The beginning of the time range during 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. |
RequestId | String | A666D44F-19D6-490E-97CF-1A64AB962C57 | The request ID. |
DomainName | String | example.com,example.aliyundoc.com | The streaming domain. |
DataInterval | String | 60 | The time interval between the entries returned. Unit: seconds. |
RealTimeTrafficDataPerInterval | Array of DataModule | The traffic data that was collected at each interval. | |
DataModule | |||
Value | String | 0 | The traffic. Unit: bytes. |
TimeStamp | String | 2015-12-10T15:01:00Z | The timestamp of the data returned. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
Examples
Sample requests
http(s)://live.aliyuncs.com/?Action=DescribeLiveDomainRealTimeTrafficData
&DomainName=example.com,example.aliyundoc.com
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeLiveDomainRealTimeTrafficDataResponse>
<EndTime>2015-12-10T15:01:00Z</EndTime>
<StartTime>2015-12-10T15:00:00Z</StartTime>
<RequestId>A666D44F-19D6-490E-97CF-1A64AB962C57</RequestId>
<DomainName>example.com,example.aliyundoc.com</DomainName>
<DataInterval>60</DataInterval>
<RealTimeTrafficDataPerInterval>
<Value>0</Value>
<TimeStamp>2015-12-10T15:01:00Z</TimeStamp>
</RealTimeTrafficDataPerInterval>
</DescribeLiveDomainRealTimeTrafficDataResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"EndTime" : "2015-12-10T15:01:00Z",
"StartTime" : "2015-12-10T15:00:00Z",
"RequestId" : "A666D44F-19D6-490E-97CF-1A64AB962C57",
"DomainName" : "example.com,example.aliyundoc.com",
"DataInterval" : "60",
"RealTimeTrafficDataPerInterval" : [ {
"Value" : "0",
"TimeStamp" : "2015-12-10T15:01:00Z"
} ]
}
Error codes
HTTP status code | Error code | Error message | Description |
400 | InvalidStartTime.Malformed | Specified StartTime is malformed. | The format of the start time is invalid. Check whether the value of the StartTime parameter is valid. |
400 | InvalidEndTime.Malformed | Specified EndTime is malformed. | The format of the end time is invalid. Check whether the value of the EndTime parameter is valid. |
400 | InvalidEndTime.Mismatch | Specified end time does not math the specified start time. | The end time does not match the start time. Check whether the value of the EndTime parameter matches. |
400 | InvalidStartTime.ValueNotSupported | The specified value of parameter StartTime is not supported. | The value specified for the StartTime parameter is invalid. |
For a list of error codes, see Service error codes.