Queries the total number and proportions of HTTP status codes returned from an accelerated domain name. Data is collected every minute.

Note
  • You can query data collected within the last seven days. The time range that is specified by the StartTime and EndTime parameters cannot exceed 24 hours in each call.
  • If you do not set StartTime or EndTime, data collected within the last one hour is queried. If you set both StartTime and EndTime, data collected within the specified time range is queried.
  • The maximum number of times that each user can call this operation per second is 10.
  • You can specify multiple domain names (no more than 100) and separate them with commas (,).

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 No DescribeDomainRealTimeHttpCodeData

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

DomainName String Yes example1.com,example2.com

The accelerated domain names. You can specify multiple accelerated domain names and separate them with commas (,).

Note You can specify at most 500 accelerated domain names in each call.
StartTime String No 2019-11-30T05:39: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.

EndTime String No 2019-11-30T05:40:00Z

The end 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 The end time must be later than the start time.
IspNameEn String No unicom

The name of the ISP for your Alibaba Cloud CDN service. You can call the DescribeCdnRegionAndIsp operation to query ISP names.

LocationNameEn String No beijing

The name of the region. If you do not set this parameter, all regions are queried. You can call the DescribeCdnRegionAndIsp operation to query the most recent region list.

Response parameters

Parameter Type Example Description
DataInterval String 60

The data collection interval. Unit: second.

DomainName String example1.com,example2.com

The information about the accelerated domain name.

EndTime String 2019-11-29T05:42:00Z

The end of the time range that was returned.

RealTimeHttpCodeData Array of UsageData

The proportions of HTTP status codes at each time interval.

UsageData
TimeStamp String 2019-11-29T05:39:00Z

The timestamp of the data returned.

Value Array of RealTimeCodeProportionData

The proportions of each HTTP status code type.

RealTimeCodeProportionData
Code String 500

The HTTP status code returned.

Count String 100

The total number of HTTP status codes returned.

Proportion String 28.4496124031008

The proportion of the HTTP status code.

RequestId String BC858082-736F-4A25-867B-E5B67C85ACF7

The ID of the request.

StartTime String 2019-11-29T05:39:00Z

The beginning of the time range that was queried.

Examples

Sample requests

http(s)://cdn.aliyuncs.com/?Action=DescribeDomainRealTimeHttpCodeData
&DomainName=example1.com,example2.com
&StartTime=2019-11-29T05:39:00Z
&EndTime=2019-11-29T05:42:00Z
&<Common request parameters>

Sample success responses

XML format

<DescribeDomainRealTimeHttpCodeDataResponse>
  <DataInterval>60</DataInterval>
  <RequestId>99E690FC-86A3-4533-8F61-CF9E319141A4</RequestId>
  <DomainName>example1.com,example2.com</DomainName>
  <EndTime>2019-11-29T05:42:00Z</EndTime>
  <StartTime>2019-11-29T05:39:00Z</StartTime>
  <RealTimeHttpCodeData>
        <UsageData>
              <TimeStamp>2019-11-29T05:39:00Z</TimeStamp>
              <Value>
                    <RealTimeCodeProportionData>
                          <Count>2</Count>
                          <Proportion>100</Proportion>
                          <Code>200</Code>
                    </RealTimeCodeProportionData>
              </Value>
        </UsageData>
        <UsageData>
              <TimeStamp>2019-11-29T05:40:00Z</TimeStamp>
              <Value>
                    <RealTimeCodeProportionData>
                          <Count>1</Count>
                          <Proportion>50</Proportion>
                          <Code>200</Code>
                    </RealTimeCodeProportionData>
                    <RealTimeCodeProportionData>
                          <Count>1</Count>
                          <Proportion>50</Proportion>
                          <Code>304</Code>
                    </RealTimeCodeProportionData>
              </Value>
        </UsageData>
        <UsageData>
              <TimeStamp>2019-11-29T05:41:00Z</TimeStamp>
              <Value>
                    <RealTimeCodeProportionData>
                          <Count>11</Count>
                          <Proportion>91.66666666666666</Proportion>
                          <Code>200</Code>
                    </RealTimeCodeProportionData>
                    <RealTimeCodeProportionData>
                          <Count>1</Count>
                          <Proportion>8.333333333333332</Proportion>
                          <Code>206</Code>
                    </RealTimeCodeProportionData>
              </Value>
        </UsageData>
  </RealTimeHttpCodeData>
</DescribeDomainRealTimeHttpCodeDataResponse>

JSON format

{
    "DataInterval": 60,
    "RequestId": "99E690FC-86A3-4533-8F61-CF9E319141A4",
    "DomainName": "example1.com,example2.com",
    "EndTime": "2019-11-29T05:42:00Z",
    "StartTime": "2019-11-29T05:39:00Z",
    "RealTimeHttpCodeData": {
        "UsageData": [
            {
                "TimeStamp": "2019-11-29T05:39:00Z",
                "Value": {
                    "RealTimeCodeProportionData": [
                        {
                            "Count": 2,
                            "Proportion": 100,
                            "Code": "200"
                        }
                    ]
                }
            },
            {
                "TimeStamp": "2019-11-29T05:40:00Z",
                "Value": {
                    "RealTimeCodeProportionData": [
                        {
                            "Count": 1,
                            "Proportion": 50,
                            "Code": "200"
                        },
                        {
                            "Count": 1,
                            "Proportion": 50,
                            "Code": "304"
                        }
                    ]
                }
            },
            {
                "TimeStamp": "2019-11-29T05:41:00Z",
                "Value": {
                    "RealTimeCodeProportionData": [
                        {
                            "Count": 11,
                            "Proportion": "91.66666666666666",
                            "Code": "200"
                        },
                        {
                            "Count": 1,
                            "Proportion": "8.333333333333332",
                            "Code": "206"
                        }
                    ]
                }
            }
        ]
    }
}

Error codes

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