You can call this operation to query the proportions of HTTP status codes based on back-to-origin statistics for one or more accelerated domains. The time granularity for data aggregation is 5 minutes.

When you call this operation, follow these rules:
  • If you do not specify the StartTime or EndTime parameter, the data for the last 24 hours is returned. If you specify both the StartTime and EndTime parameters, the data for the specified time range is returned.
  • The maximum time range for a data query is 90 days.

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 DescribeDomainSrcHttpCodeData

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

DomainName String No example1.com,example2.com

The name of the accelerated domain for which you want to query data. You can specify multiple accelerated domain names and separate them with commas (,).

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

The end of the time range to query.

  • 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 300

The data sampling interval. Unit: seconds. If you do not specify this parameter or if you specify an invalid value, the default value is used. The valid values vary, depending on the specified time range:

  • Less than 3 days: 300 (default), 3600, and 86400
  • 3 to 31 (exclusive) days: 3600 (default) and 86400
  • No less than 31 days: 86400 (default)
StartTime String No 2015-11-30T05:33: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.
  • The time granularity for data aggregation is 5 minutes.

Response parameters

Parameter Type Example Description
DataInterval String 300

The data sampling interval. Unit: seconds.

DomainName String example1.com,example2.com

The name of the accelerated domain for which the data was queried.

EndTime String 2015-11-30T05:40:00Z

The end of the time range during which the data was queried.

HttpCodeData Array

The proportions of HTTP status codes at each data sampling interval.

UsageData

In XML format, this parameter indicates the proportions of HTTP status codes at a specific data sampling interval. In JSON format, this parameter indicates the proportions of HTTP status codes at all data sampling intervals.

TimeStamp String 2015-11-30T05:30:00Z

The timestamp of the data returned.

Value Array

The list of proportions of HTTP status codes.

CodeProportionData

In XML format, this parameter indicates the proportion of a specific HTTP status code. In JSON format, this parameter indicates the proportions of all HTTP status codes.

Code String 200

The HTTP status code.

Count String 2300

The total number of HTTP status codes returned.

Proportion String 67.1458998935037

The proportion of the HTTP status code.

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

The ID of the request.

StartTime String 2015-11-30T05:33:00Z

The beginning of the time range during which the data was queried.

Examples

Sample requests

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

Sample success responses

XML format

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

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

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