Queries the network traffic data that is collected in real time for one or more domain names.

  • If you specify neither the StartTime parameter nor 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.
  • You can query the data of the last 90 days at most.
  • This operation can be called up to 10 times per second.
  • 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.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 test.com

The streaming domain.

Separate multiple domain names 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 set this parameter, the data of the last hour is returned.
IspNameEn String No alibaba

The name of the Internet service provider (ISP).

To query ISPs, call the DescribeCdnRegionAndIsp operation.

LocationNameEn String No tianjin

The name of the region in which you want to query data.

To query regions, call the DescribeCdnRegionAndIsp operation.

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
DataInterval String 60

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

DomainName String test.com

The streaming domain.

EndTime String 2015-12-10T15:01:00Z

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.

RealTimeTrafficDataPerInterval Array of DataModule

The network traffic data that was collected for each interval.

DataModule
TimeStamp String 2015-12-10T15:01:00Z

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.

Value String 0

The network traffic data. Unit: byte.

RequestId String A666D44F-19D6-490E-97CF-1A64AB962C57

The ID of the request.

StartTime String 2015-12-10T15:00:00Z

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.

Examples

Sample requests

http(s)://live.aliyuncs.com/? Action=DescribeLiveDomainRealTimeTrafficData
&<Common request parameters>

Sample success responses

XML format

<DescribeLiveDomainRealTimeTrafficDataResponse>
      <DomainName>test.com</DomainName>
      <DataInterval>60</DataInterval>
      <RealTimeTrafficDataPerInterval>
            <DataModule>
                  <TimeStamp>2015-12-10T15:00:00Z</TimeStamp>
                  <Value>0</Value>
            </DataModule>
            <DataModule>
                  <TimeStamp>2015-12-10T15:01:00Z</TimeStamp>
                  <Value>0</Value>
            </DataModule>
      </RealTimeTrafficDataPerInterval>
      <RequestId>A666D44F-19D6-490E-97CF-1A64AB962C57</RequestId>
      <StartTime>2015-12-10T15:00:00Z</StartTime>
      <EndTime>2015-12-10T15:01:00Z</EndTime>
</DescribeLiveDomainRealTimeTrafficDataResponse>

JSON format

{
    "DomainName": "test.com",
    "DataInterval": "60",
    "RealTimeTrafficDataPerInterval": {
        "DataModule": [
            {
                "TimeStamp": "2015-12-10T15:00:00Z",
                "Value": "0"
            },
            {
                "TimeStamp": "2015-12-10T15:01:00Z",
                "Value": "0"
            }
        ]
    },
    "RequestId": "A666D44F-19D6-490E-97CF-1A64AB962C57",
    "StartTime": "2015-12-10T15:00:00Z",
    "EndTime": "2015-12-10T15:01:00Z"
}

Error codes

HttpCode Error code Error message Description
400 InvalidStartTime.Malformed Specified StartTime is malformed. The error message returned because 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 error message returned because 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 error message returned because the end time is earlier than the start time. Check whether the values of the StartTime and EndTime parameters are valid.

For a list of error codes, visit the API Error Center.