You can call the DescribeDomainHttpCodeData operation to query the proportions of the returned HTTP status codes with a minimum time granularity of five minutes.

  • 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 DescribeDomainHttpCodeData.
DomainName String Yes The CDN domain name that you want to query. 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.

Response parameters

Parameter Type Description
RequestId String The ID of the request.
DomainName String The domain name information.
DataInterval String The data sampling interval, which is 300 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.
HttpCodeData UsageData[] The proportions of HTTP status codes at each data sampling interval.

UsageData

Parameter Type Description
TimeStamp String The timestamp of the data.
Value CodeProportionData[] The list of the proportions of HTTP status codes.

CodeProportionData

Parameter Type Description
Code String The HTTP status code.
Proportion String The proportion of the HTTP status code.
Count String  The times that the HTTP status code has been returned.

Examples

Sample request

http://cdn.aliyuncs.com?Action=DescribeDomainHttpCodeData&DomainName="example1.com,example2.com"
&StartTime=2015-11-30T05:33:00Z
&EndTime=2015-11-30T05:40:00Z
&<Common request parameters>

Sample success response

JSON format

{
    "HttpCodeData": {
        "UsageData": [
            {
                "TimeStamp": "2015-11-30T05:40:00Z",
                "Value": {
                    "CodeProportionData": [
                        {
                            "Proportion": "66.046511627907",
                            "Code": "200"
                        },
                        {
                            "Proportion": "4.72868217054264",
                            "Code": "206"
                        },
                        {
                            "Proportion": "0.155038759689922",
                            "Code": "302"
                        },
                        {
                            "Proportion": "0.62015503875969",
                            "Code": "304"
                        },
                        {
                            "Proportion": "28.4496124031008",
                            "Code": "500"
                        }
                    ]
                }
            },
            {
                "TimeStamp": "2015-11-30T05:35:00Z",
                "Value": {
                    "CodeProportionData": [
                        {
                            "Proportion": "64.7822765469824",
                            "Code": "200"
                        },
                        {
                            "Proportion": "3.74331550802139",
                            "Code": "206"
                        },
                        {
                            "Proportion": "0.152788388082506",
                            "Code": "302"
                        },
                        {
                            "Proportion": "1.90985485103132",
                            "Code": "304"
                        },
                        {
                            "Proportion": "29.4117647058824",
                            "Code": "500"
                        }
                    ]
                }
            },
            {
                "TimeStamp": "2015-11-30T05:30:00Z",
                "Value": {
                    "CodeProportionData": [
                        {
                            "Proportion": "67.1458998935037",
                            "Code": "200"
                        },
                        {
                            "Proportion": "12.6730564430245",
                            "Code": "206"
                        },
                        {
                            "Proportion": "0.053248136315229",
                            "Code": "302"
                        },
                        {
                            "Proportion": "0.958466453674121",
                            "Code": "304"
                        },
                        {
                            "Proportion": "19.1693290734824",
                            "Code": "500"
                        }
                    ]
                }
            }
        ]
    },
    "DataInterval": "300",
    "RequestId": "BC858082-736F-4A25-867B-E5B67C85ACF7",
    "DomainName": "example1.com,example2.com",
    "EndTime": "2015-11-30T05:40:00Z",
    "StartTime": "2015-11-30T05:33:00Z"
}

Error codes

Error code Error message HTTP status code Description
Throttling Request was denied due to request throttling. 503 The error message returned because the request is denied due to network traffic throttling.
IllegalOperation Illegal domain, operation is not permitted. 403 The error message returned because the domain name is invalid.
OperationDenied Your account does not open CDN service yet. 403 The error message returned because the CDN service is not activated.
OperationDenied Your CDN service is suspended. 403 The error message returned because the CDN service is suspended.
InvalidDomain.NotFound The domain provided does not belong to you. 404 The error message returned because the domain name does not exist or does not belong to you.
InvalidDomain.Offline The domain provided is offline. 404 The error message returned because the domain name is disabled.
ServiceBusy The specified Domain is configuring, please retry later. 403 The error message returned because the domain name is being configured. Please try again later.
InvalidDomain.Configure_failed Failed to configure the provided domain. 500 The error message returned because the domain name configuration fails.
MissingParameter StartTime and EndTime can not be single. 400 The error message returned because you must set both the StartTime and EndTime parameters.
InvalidStartTime.Malformed Specified start time is malformed. 400 The error message returned because the format of the StartTime parameter is invalid.
InvalidEndTime.Malformed Specified end time is malformed. 400 The error message returned because the format of the EndTime parameter is invalid.
InvalidEndTime.Mismatch Specified end time does not math the specified start time. 400 The error message returned because the EndTime is earlier than the StartTime.
InvalidStartTime.ValueNotSupported Specified end time does not math the specified start time. 400 The error message returned because the time range specified by the EndTime and StartTime parameters exceeds 90 days.