You can call the DescribeDomainBpsData operation to query the network bandwidth data. The bandwidth is measured in bit/s.

  • If neither the StartTime nor EndTime parameter is set, the data within the last 24 hours is queried.
  • If you set both the StartTime and EndTime parameters, the data within the specified time range is queried.
Note
  • You can specify one or more domain names. Separate these domain names with commas (,).
  • The maximum time range that you can specify is the last 90 days.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Description
Action String  Yes The operation that you want to perform. Set this parameter to DescribeDomainISPData.
DomainName String No
  • The domain name. If you do not set this parameter, all domain names are queried.
  • You can specify one or more domain names.
  • Separate these domain names with commas (,).
StartTime String No The beginning of the time range where the data is queried.
  • Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format.
  • The time must be in UTC.
  • The minimum time granularity is five minutes. If you do not set this parameter, the data within the last 24 hours is queried.
EndTime String No
  • The end of the time range where the data is queried. 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.
Interval String No
  • The time granularity for query. Unit: seconds. Valid values:
  • Less than 3 days: 300 (default), 3600, and 86400.
  • 3 to 31 days (excluding 31 days): 3600 (default) and 86400
  • No less than 31 days: 86400
  • If you do not set this parameter or the specified value is invalid, the default value is used.
LocationNameEn String No The English name of the region. If you do not specify a region, all regions are queried. You can call the DescribeCdnRegionAndIsp operation to query the region names.
IspNameEn String No The English name of the Internet service provider (ISP). If you do not specify an ISP, all ISPs are queried. You can call the DescribeCdnRegionAndIsp operation to query the ISP names.

Response parameters

Parameter Type Description
DomainName String The domain name information.
DataInterval String The data sampling interval. Unit: seconds.
StartTime DateTime The beginning of the time range where the data was queried.
EndTime DateTime The end of the time range where the data was queried.
LocationNameEn String The English name of the region.
IspNameEn String The English name of the Internet service provider (ISP).
BpsDataPerInterval "DataModule": [] The bandwidth data retrieved at each sampling interval.

DataModule

Parameter Type Description
TimeStamp String The timestamp of the data.
Value String The bandwidth. Unit: bit/s.
DomesticValue String The bandwidth data in Mainland China. When the bandwidth data is queried by ISP, this parameter is blank.
OverseasValue String  The bandwidth data outside Mainland China. When the bandwidth data is queried by ISP, this parameter is blank.
HttpsValue String The HTTPS bandwidth on L1 cache nodes. Unit: bit/s.
HttpsDomesticValue String The HTTPS bandwidth on L1 cache nodes in Mainland China. When the bandwidth data is queried by ISP, this parameter is blank.
HttpsOverseasValue String The HTTPS bandwidth on L1 cache nodes outside Mainland China. When the bandwidth data is queried by ISP, this parameter is blank.

Examples

Sample request

http://cdn.aliyuncs.com?Action=DescribeDomainBpsData&DomainName=example.com
&StartTime=2015-12-10T20:00:00Z
&EndTime=2015-12-10T21:05:00Z
&<Common request parameters>

Sample success response

JSON format

{
    "BpsDataPerInterval": {
        "DataModule": [
            {
                "TimeStamp": "2015-12-10T20:00:00Z",
                "Value": "11288111",
                "DomesticValue": "11286111",
                "OverseasValue": "2000",
                "HttpsValue": "11288111",
                "HttpsDomesticValue": "11286111",
                "HttpsOverseasValue": "2000"
            },
            {
                "TimeStamp": "2015-12-10T20:05:00Z",
                "Value": "12124821",
                "DomesticValue": "12112821",
                "OverseasValue": "12000",
                "HttpsValue": "11288111",
                "HttpsDomesticValue": "11286111",
                "HttpsOverseasValue": "2000"
            }
        ]
    },
    "DomainName": "example.com",
    "DataInterval": "300",
    "RequestId": "3C6CCEC4-6B88-4D4A-93E4-D47B3D92CF8F",
    "StartTime": "2015-12-10T20:00:00Z",
    "EndTime": "2015-12-10T21:00:00Z"
}

Error codes

Error code Error message HTTP status code Description
InvalidStartTime.Malformed Specified StartTime is malformed. 400 The error message returned because the format of the StartTime parameter is invalid.
InvalidEndTime.Malformed Specified EndTime is malformed. 400 The error message returned because the format of the EndTime parameter is invalid.
InvalidStartTime.ValueNotSupported The specified value of parameter StartTime is not supported. 400 The error message returned because the time range specified by the EndTime and StartTime parameters exceeds 90 days.
InvalidEndTime.Mismatch Specified EndTime does not math the specified StartTime. 400 The error message returned because the EndTime is earlier than StartTime.