开发者社区> 问答> 正文

如何查询返回码?



DescribeDomainHttpCodeData



描述


获取加速域名最小5分钟粒度的HTTP返回码占比数据
不指定StartTime和EndTime时,默认读取过去24小时的数据,同时支持按指定的起止时间查询,两者需要同时指定。

  • 支持批量域名查询,多个域名可用逗号(半角)分隔
  • 最多可获取最近90天的数据


请求参数

参数类型必要描述
ActionString操作接口名,系统规定参数取值:DescribeDomainHttpCodeData
DomainNameString需要查询的加速域名,支持批量,多个域名用逗号(半角)分隔
StartTimeString获取数据起始时间点,日期格式按照ISO8601表示法,并使用UTC时间。格式为:YYYY-MM-DDThh:mmZ最小数据粒度为5分钟不写默认读取过去24小时数据
EndTimeString结束时间需大于起始时间;获日期格式按照ISO8601表示法,并使用UTC时间。格式为:YYYY-MM-DDThh:mmZ
Time ergeString取值范围 on:默认值,每条记录的时间间隔会根据时间跨度做合并;off:返回5分钟粒度数据,最大时间跨度为31天
IntervalString查询数据的时间粒度,支持300, 3600, 14400, 28800和86400秒。不传和传的值不支持时,使用默认值300秒
LocationNameEnString区域英文名,通过DescribeCdnRegionAndIsp接口获得,不传为所有区域
IspNameEnString运营商英文名,通过DescribeCdnRegionAndIsp接口获得,不传为所有运营商


返回参数

名称类型描述
RequestIdString请求ID
DomainNameString加速域名信息
DataIntervalString每条记录的时间间隔,以秒为单位,固定值300S
StartTimeDateTime开始时间
EndTimeDateTime结束时间
HttpCodeDataUsageData[]每个时间间隔的HTTP返回码占比数据


UsageData

名称类型描述
TimeStampString时间片起始时刻
ValueCodeProportionData[]各返回码占比使用数据list


CodeProportionData

名称类型描述
CodeStringhttp返回码
ProportionString占比使用数据


特殊错误码

错误代码描述Http 状态码语义
ThrottlingRequest was denied due to request throttling.503请求被流量控制限制
IllegalOperationIllegal domain, operation is not permitted.403非法域名, 无法操作
OperationDeniedYour account does not open CDN service yet.403未开通CDN服务
OperationDeniedYour CDN service is suspended.403CDN服务已被停止
InvalidDomain.NotFoundThe domain provided does not belong to you.404域名不存在或不属于当前用户
InvalidDomain.OfflineThe domain provided is offline.404域名已下线
ServiceBusyThe specified Domain is configuring, please retry later.403域名正在配置中, 请稍后再试
InvalidDomain.Configure_failedFailed to configure the provided domain.500域名配置失败
MissingParameterStartTime and EndTime can not be single.400StartTime和EndTime不能单独设置
InvalidStartTime.MalformedSpecified start time is malformed.400StartTime格式错误
InvalidEndTime.MalformedSpecified end time is malformed.400EndTime格式错误
InvalidEndTime.MismatchSpecified end time does not math the specified start time.400EndTime小于StartTime
InvalidStartTime.ValueNotSupportedSpecified end time does not math the specified start time.400EndTime和StartTime差值超过90天


示例


请求示例: http://cdn.aliyuncs.com?Action=DescribeDomainHttpCodeData&DomainName="test.com,abc.com"
&StartTime=2015-11-30T05:33Z
&EndTime=2015-11-30T05:40Z
&<公共请求参数>


返回示例:
JSON格式 {
    "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": "test.com,abc.com",
    "EndTime": "2015-11-30T05:40Z",
    "StartTime": "2015-11-30T05:33Z"
}


XML格式: <DescribeDomainHttpCodeProportionDataResponse>
  <HttpCodeProportionData>
    <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>
  </HttpCodeProportionData>
  <DataInterval>300</DataInterval>
  <RequestId>82807D80-1C41-40A5-AFC3-53F739951A4C</RequestId>
  <DomainName>test.com,abc.com</DomainName>
  <EndTime>2015-11-30T05:40Z</EndTime>
  <StartTime>2015-11-30T05:33Z</StartTime>
</DescribeDomainHttpCodeProportionDataResponse>

展开
收起
青衫无名 2017-10-24 11:09:27 3196 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载