Queries HTTP status codes by protocol.

Note
  • If you do not set the StartTime or EndTime parameter, data within the last 24 hours is queried. If you set both the StartTime and EndTime parameters, data within the specified time range is queried. You must set both parameters or leave both of them empty.
  • You can query data within the last 90 days.
  • The maximum number of times that each user can call this operation per second is 20.
  • You can specify multiple domain names (no more than 500) 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 Yes DescribeDomainHttpCodeDataByLayer

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

DomainName String No example.com

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

If you do not specify a domain name, data of all domain names is queried.

StartTime String No 2020-07-05T22: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.

Data is collected every 5 minutes.

If you do not set this parameter, data within the last 24 hours is queried.

EndTime String No 2020-07-06T22:00: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.
Interval String No 300

The interval at which data is collected. Unit: seconds. Valid values are 300, 3600, and 86400.

Take note of the following rules:

  • If the time span between StartTime and EndTime is less than 3 days, valid values are 300, 3600, and 86400.
  • If the time span between StartTime and EndTime is from 3 to 31 days (31 days excluded), valid values are 3600 and 86400.
  • If the time span between StartTime and EndTime is 31 days or longer, the valid value is 86400.

If you do not set this parameter or the specified value is invalid, the default value is used.

LocationNameEn String No hangzhou

The name of the region. You can call the DescribeCdnRegionAndIsp operation to query the most recent region list.

If you do not specify a region, data in all regions is queried.

IspNameEn String No telecom

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

If you do not specify an ISP, data of all ISPs is queried.

Layer String No all

The protocol by which you want to query HTTP status codes. The network layer supports IPv4 and IPv6. The application layer supports http, https, and quic. You can also set the value to all.

The default value is all.

Response parameters

Parameter Type Example Description
DataInterval String 300

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

HttpCodeDataInterval Array of DataModule

The number of times that each HTTP status code was returned at each time interval.

DataModule
TimeStamp String 2015-12-10T20:35:00Z

The timestamp of the data returned.

TotalValue String 110

The total number of times that HTTP status codes were returned at each time interval.

Value String "Value": { "200": 10, "206": 100}

The number of times that the HTTP status code was returned at each time interval.

RequestId String BEA5625F-8FCF-48F4-851B-CA63946DA664

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeDomainHttpCodeDataByLayerResponse>
<HttpCodeDataInterval>
    <DataModule>
        <TimeStamp>2015-12-10T21:00:00Z</TimeStamp>
        <Value>
            <200>10</200>
            <206>100</206>
        </Value>
        <TotalValue>110</TotalValue>
    </DataModule>
    <DataModule>
        <TimeStamp>2015-12-10T20:35:00Z</TimeStamp>
        <Value>
            <200>12</200>
            <206>120</206>
        </Value>
        <TotalValue>132</TotalValue>
    </DataModule>
</HttpCodeDataInterval>
<DataInterval>300</DataInterval>
<RequestId>BEA5625F-8FCF-48F4-851B-CA63946DA664</RequestId>
</DescribeDomainHttpCodeDataByLayerResponse>

JSON format

{
    "HttpCodeDataInterval": {
        "DataModule": [
            {
                "TimeStamp": "2015-12-10T21:00:00Z",
                "Value": {
                    "200": 10,
                    "206": 100
                },
                "TotalValue": 110
            },
            {
                "TimeStamp": "2015-12-10T20:35:00Z",
                "Value": {
                    "200": 12,
                    "206": 120
                },
                "TotalValue": 132
            }
        ]
    },
    "DataInterval": "300",
    "RequestId": "BEA5625F-8FCF-48F4-851B-CA63946DA664"
}

Error codes

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