Queries the statistics on different response status codes of a website.

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 DescribeDomainStatusCodeList

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

ResourceGroupId String No rg-acfm2pz25js****

The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group.

For more information about resource groups, see Create a resource group.

RegionId String No cn-hangzhou

The region ID of the instance. Valid values:

  • cn-hangzhou: mainland China, which indicates an Anti-DDoS Pro instance. This is the default value.
  • ap-southeast-1: outside mainland China, which indicates an Anti-DDoS Premium instance.
StartTime Long Yes 1582992000

The beginning of the time range to query. The value is a UNIX timestamp. Unit: seconds.

Note This UNIX timestamp must indicate a point in time that is accurate to the minute.
EndTime Long No 1583683200

The end of the time range to query. The value is a UNIX timestamp. Unit: seconds.

Note This UNIX timestamp must indicate a point in time that is accurate to the minute.
Interval Long Yes 1000

The interval for returning statistics. Unit: seconds.

Domain String No www.aliyun.com

The domain name of the website. If you leave this parameter unspecified, the statistics on response status codes of all domain names are queried.

Note A forwarding rule must be configured for the domain name. You can call the DescribeDomains operation to query all domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.
QueryType String Yes gf

The source of the statistics. Valid values:

  • gf: the instance
  • upstrem: the origin server

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

Parameter Type Example Description
RequestId String 3B63C0DD-8AC5-44B2-95D6-064CA9296B9C

The ID of the request.

StatusCodeList Array of StatusCode

The statistics on response status codes.

Status502 Long 0

The number of 502 status codes.

Index Integer 0

The index number of the returned data.

Time Long 1582992000

The time when the statistics were collected. The value is a UNIX timestamp. Unit: seconds.

Status405 Long 0

The number of 405 status codes.

Status3XX Long 0

The number of 3xx status codes.

Status503 Long 0

The number of 503 status codes.

Status4XX Long 4486

The number of 4xx status codes.

Status2XX Long 15520

The number of 2xx status codes.

Status5XX Long 0

The number of 5xx status codes.

Status504 Long 0

The number of 504 status codes.

Status403 Long 0

The number of 403 status codes.

Status200 Long 15520

The number of 200 status codes.

Status404 Long 0

The number of 404 status codes.

Status501 Long 0

The number of 501 status codes.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeDomainStatusCodeList
&StartTime=1582992000
&EndTime=1583683200
&Interval=1000
&Domain=www.aliyun.com
&QueryType=gf
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDomainStatusCodeListResponse>
    <RequestId>3B63C0DD-8AC5-44B2-95D6-064CA9296B9C</RequestId>
    <StatusCodeList>
        <Status502>0</Status502>
        <Index>0</Index>
        <Time>1582992000</Time>
        <Status405>0</Status405>
        <Status3XX>0</Status3XX>
        <Status503>0</Status503>
        <Status4XX>4486</Status4XX>
        <Status2XX>15520</Status2XX>
        <Status5XX>0</Status5XX>
        <Status504>0</Status504>
        <Status403>0</Status403>
        <Status200>15520</Status200>
        <Status404>0</Status404>
        <Status501>0</Status501>
    </StatusCodeList>
</DescribeDomainStatusCodeListResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "3B63C0DD-8AC5-44B2-95D6-064CA9296B9C",
  "StatusCodeList" : [ {
    "Status502" : 0,
    "Index" : 0,
    "Time" : 1582992000,
    "Status405" : 0,
    "Status3XX" : 0,
    "Status503" : 0,
    "Status4XX" : 4486,
    "Status2XX" : 15520,
    "Status5XX" : 0,
    "Status504" : 0,
    "Status403" : 0,
    "Status200" : 15520,
    "Status404" : 0,
    "Status501" : 0
  } ]
}

Error codes

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