DescribeDomainHttpCodeData

Last Updated: Apr 02, 2018

Description

  • Obtain the HTTP return code proportion of CDN domains. The minimum granularity is 5 minutes.

  • When StartTime and EndTime are not specified, the system reads data from the past 24 hours by default. Query by specified start time and end time is also supported. The two parameters must be both specified.

    • Batch domain name query is supported. Multiple domain names are separated by commas (half width).

    • Data from the past 90 days can be obtained at most.

Request parameters

Parameters Type Required Example values Description
Action String Yes DescribeDomainHttpCodeData

The name of this interface. Value: DescribeDomainHttpCodeData

DomainName String No test.test.com

CDN domain name to be queried. Batch query is supported. Multiple domain names are separated by commas (half width).

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

  • The end time must be later than the start time.
  • The date format adopts ISO8601 notation and uses the UTC time.
  • Format: YYYY-MM-DDThh:mmZ.

Interval String No 300

Time granularity of data query.

  • 300s, 3600s, 14400s, 28800s and 86400s are supported.
  • When the parameter is left blank or when the value is not supported, the default value 300 seconds is used.

IspNameEn String No unicom

Carrier name in English, which is obtained using the DescribeCdnRegionAndIsp interface. If the parameter is left blank, the English names of all carriers are obtained.

LocationNameEn String No beijing

Region name in English, which is obtained using the DescribeCdnRegionAndIsp interface. If the parameter is left blank, the English names of all regions are obtained.

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

Start time of data query.

  • The date format adopts ISO8601 notation and uses the UTC time.
  • Format: YYYY-MM-DDThh:mmZ.
  • Minimum data granularity: 5 minutes.

TimeMerge String No on

Value range:

  • on: default value, indicating that the interval of each record can be merged based on the time span.
  • off: data of 5-min-granularity is returned, and the maximum time span is 31 days.

Return parameters

Parameters Type Example values Description
RequestId String BC858082-736F-4A25-867B-E5B67C85ACF7

The ID of the request.

DomainName String test.test.com

Domain name.

DataInterval String 300

Data interval.

StartTime String 2015-11-30T05:33Z

Start time.

EndTime String 2015-11-30T05:40Z

End time.

HttpCodeData

Data.

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

Time stamp.

  └Value

value.

    └Code String 200

HTTP return code.

    └Proportion String 66.046511627907

Proportion data.

    └Count String 300

Total number.

Example

Request example

  1. http://cdn.aliyuncs.com?Action=DescribeDomainHttpCodeData&DomainName="test.com,abc.com"
  2. &StartTime=2015-11-30T05:33Z
  3. &EndTime=2015-11-30T05:40Z
  4. &<公public request parameter>

Normal return example

JSON format

  1. {
  2. "DataInterval":"300",
  3. "DomainName":"test.com,abc.com",
  4. "EndTime":"2015-11-30T05:40Z",
  5. "HttpCodeData":{
  6. "UsageData":[
  7. {
  8. "TimeStamp":"2015-11-30T05:40:00Z",
  9. "Value":{
  10. "CodeProportionData":[
  11. {
  12. "Code":"200",
  13. "Proportion":"66.046511627907"
  14. },
  15. {
  16. "Code":"206",
  17. "Proportion":"4.72868217054264"
  18. },
  19. {
  20. "Code":"302",
  21. "Proportion":"0.155038759689922"
  22. },
  23. {
  24. "Code":"304",
  25. "Proportion":"0.62015503875969"
  26. },
  27. {
  28. "Code":"500",
  29. "Proportion":"28.4496124031008"
  30. }
  31. ]
  32. }
  33. },
  34. {
  35. "TimeStamp":"2015-11-30T05:35:00Z",
  36. "Value":{
  37. "CodeProportionData":[
  38. {
  39. "Code":"200",
  40. "Proportion":"64.7822765469824"
  41. },
  42. {
  43. "Code":"206",
  44. "Proportion":"3.74331550802139"
  45. },
  46. {
  47. "Code":"302",
  48. "Proportion":"0.152788388082506"
  49. },
  50. {
  51. "Code":"304",
  52. "Proportion":"1.90985485103132"
  53. },
  54. {
  55. "Code":"500",
  56. "Proportion":"29.4117647058824"
  57. }
  58. ]
  59. }
  60. },
  61. {
  62. "TimeStamp":"2015-11-30T05:30:00Z",
  63. "Value":{
  64. "CodeProportionData":[
  65. {
  66. "Code":"200",
  67. "Proportion":"67.1458998935037"
  68. },
  69. {
  70. "Code":"206",
  71. "Proportion":"12.6730564430245"
  72. },
  73. {
  74. "Code":"302",
  75. "Proportion":"0.053248136315229"
  76. },
  77. {
  78. "Code":"304",
  79. "Proportion":"0.958466453674121"
  80. },
  81. {
  82. "Code":"500",
  83. "Proportion":"19.1693290734824"
  84. }
  85. ]
  86. }
  87. }
  88. ]
  89. },
  90. "RequestId":"BC858082-736F-4A25-867B-E5B67C85ACF7",
  91. "StartTime":"2015-11-30T05:33Z"
  92. }

Exception return example

JSON format

  1. {
  2. "Code":"InternalError",
  3. "HostId":"cdn.aliyuncs.com",
  4. "Message":"The request processing has failed due to some unknown error.",
  5. "RequestId":"16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
  6. }

Error code

For more information, see Error code of this product.

Thank you! We've received your feedback.