Queries the bandwidth and traffic data for one or more domain names by protocol.

Usage note

You can query data for the past 90 days maximum.

You can query data for a maximum of 500 domain names at a time. Separate them with commas (,). For multiple domain names, the merged data will be returned.

The following list describes the time intervals of the data entries returned depending on the time range specified by StartTime and EndTime:

  • If the time range is smaller than or equal to 3 days, the time interval is 5 minutes.
  • If the time range is larger than 3 days but smaller than or equal to 31 days, the time interval is 1 hour.
  • If the time range is larger than 31 days, the time interval is 1 day.
Note If neither the StartTime nor the EndTime parameter is set, the data of the past 24 hours is returned.

QPS limit

A single user can perform a maximum of 20 queries per second (QPS). If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit on an API operation in ApsaraVideo Live.

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 DescribeLiveDomainBpsDataByLayer

The operation that you want to perform. Set the value to DescribeLiveDomainBpsDataByLayer.

DomainName String No pull.aliyundoc.com

The streaming domain name or names.

Note
  • If you do not set this parameter, the merged data of all your domain names is returned.
  • You can specify multiple domain names and separate them with commas (,).
StartTime String No 2022-03-15T16:00:00Z

The beginning time of the data you want to query. The time is in the yyyy-MM-ddTHH:mm:ssZ format and displayed in UTC.

Note If you do not specify this parameter, the data of the past 24 hours is returned by default. The minimum time interval between the data entries is 5 minutes.
EndTime String No 2022-03-16T16:59:59Z

The end time must be later than the start time. The time is in the yyyy-MM-ddTHH:mm:ssZ format and displayed in UTC.

Interval String No 300

The time interval between the data entries. Unit: seconds. Valid values:

  • 300
  • 3600
  • 86400
    Note
    • If the time range specified by the StartTime and EndTime parameters is smaller than or equal to 3 days, the supported time intervals between the data entries include 300, 3600, and 86400.
    • If the time range is larger than 3 days but smaller than or equal to 31 days, the supported time intervals between the data entries include 3600 and 86400.
    • If the time range is larger than 31 days, the supported time interval between the data entries is 86400.
    • The default value is 300. If you do not set this parameter or if you specify an invalid value, the default value is used.
IspNameEn String No tele***

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

Note You can call the DescribeLiveRegionAndIsp operation to obtain the names of regions and ISPs.
LocationNameEn String No hangzhou

The name of the region. If you do not specify this parameter, the data of all regions is queried.

Note You can call the DescribeLiveRegionAndIsp operation to obtain the names of regions and ISPs.
Layer String No all

The layers at which you want to query the bandwidth and traffic data. Valid values:

  • IPv4 and IPv6 (network layer)
  • http, https, and quic (application layer)
  • all (default value)

Response parameters

Parameter Type Example Description
BpsDataInterval Array of DataModule

The number of visits per second collected at each time interval.

DataModule
TimeStamp String 2022-03-15T16:00:00Z

The timestamp of the data returned.

TrafficValue String 331

The total traffic. Unit: bytes.

Value String 0.56

The peak bandwidth value. Unit: bit/s.

DataInterval String 300

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

RequestId String BEA5625F-8FCF-48F4-851B-2A48566EA967

The ID of the request.

Examples

Sample requests

http://live.aliyuncs.com/?Action=DescribeLiveDomainBpsDataByLayer&DomainName=pull.aliyundoc.com
&StartTime=2022-03-15T16:00:00Z
&EndTime=2022-03-16T16:59:59Z
&<Common request parameters>

Sample success responses

XML format

<DescribeLiveDomainBpsDataByLayerResponse>
  <RequestId>BEA5625F-8FCF-48F4-851B-2A48566EA967</RequestId>
  <DataInterval>300</DataInterval>
  <BpsDataInterval>
        <DataModule>
              <Value>0.56</Value>
              <TrafficValue>331</TrafficValue>
              <TimeStamp>2022-03-15T16:00:00Z</TimeStamp>
        </DataModule>
  </BpsDataInterval>
</DescribeLiveDomainBpsDataByLayerResponse>

JSON format

{
    "RequestId":"BEA5625F-8FCF-48F4-851B-2A48566EA967",
    "DataInterval":"300",
    "BpsDataInterval": {
        "DataModule": [
            {
                "Value":"0.56",
                "TrafficValue":"331",
                "TimeStamp":"2022-03-15T16:00:00Z"
            }
        ]
    }
}

Error codes

HttpCode Error code Error message Description
400 InvalidStartTime.Malformed Specified parameter StartTime is not valid. The error message returned because the format of the start time is invalid. Check whether the value of the StartTime parameter is correct.
400 InvalidEndTime.Malformed Specified parameter EndTime is not valid. The error message returned because the format of the end time is invalid. Check whether the value of the EndTime parameter is correct.
400 InvalidEndTime.Mismatch Specified end time does not math the specified start time. The error message returned because the end time is not later than the start time. Check whether the values of the StartTime and EndTime parameters are valid.
400 InvalidStartTime.ValueNotSupported Specified end time does not math the specified start time,And the time range does not exceed 90 days. The error message returned because the start time is later than the end time or the time range specified by the StartTime and EndTime parameters is beyond 90 days. Check whether the values of the StartTime and EndTime parameters are valid.

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