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 DescribeDomainStatusCodeCount

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

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 Yes 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.
Domain String No www.aliyun.com

The domain name of the website that you want to query. If you leave this parameter unspecified, the statistics on all domain names are queried.

Note The domain name must be added to Anti-DDoS Pro or Anti-DDoS Premium. You can call the DescribeDomains operation to query all the domain names that are added to Anti-DDoS Pro or Anti-DDoS Premium.

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 C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E

The ID of the request.

Status501 Long 0

The number of 501 status codes within the specified period of time.

Status502 Long 0

The number of 502 status codes within the specified period of time.

Status403 Long 0

The number of 403 status codes within the specified period of time.

Status503 Long 0

The number of 503 status codes within the specified period of time.

Status404 Long 897

The number of 404 status codes within the specified period of time.

Status405 Long 0

The number of 405 status codes within the specified period of time.

Status504 Long 0

The number of 504 status codes within the specified period of time.

Status2XX Long 951472

The number of 2xx status codes within the specified period of time.

Status200 Long 951159

The number of 200 status codes within the specified period of time.

Status3XX Long 133209

The number of 3xx status codes within the specified period of time.

Status4XX Long 5653

The number of 4xx status codes within the specified period of time.

Status5XX Long 14

The number of 5xx status codes within the specified period of time.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeDomainStatusCodeCount
&StartTime=1582992000
&EndTime=1583683200
&Common request parameters

Sample success responses

XML format

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

<DescribeDomainStatusCodeCountResponse>
    <RequestId>C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E</RequestId>
    <Status501>0</Status501>
    <Status502>0</Status502>
    <Status403>0</Status403>
    <Status503>0</Status503>
    <Status404>897</Status404>
    <Status405>0</Status405>
    <Status504>0</Status504>
    <Status2XX>951472</Status2XX>
    <Status200>951159</Status200>
    <Status3XX>133209</Status3XX>
    <Status4XX>5653</Status4XX>
    <Status5XX>14</Status5XX>
</DescribeDomainStatusCodeCountResponse>

JSON format

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

{
  "RequestId" : "C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E",
  "Status501" : 0,
  "Status502" : 0,
  "Status403" : 0,
  "Status503" : 0,
  "Status404" : 897,
  "Status405" : 0,
  "Status504" : 0,
  "Status2XX" : 951472,
  "Status200" : 951159,
  "Status3XX" : 133209,
  "Status4XX" : 5653,
  "Status5XX" : 14
}

Error codes

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