开发者社区> 问答> 正文

如何查询热门URL?



DescribeDomainTopUrlVisit



描述


获取加速域名某天内的热门URL列表
不指定StartTime,默认读取前一天的数据。

  • 只支持一个域名,或当前用户下所有域名
  • 最多可获取最近90天的数据


请求参数

参数类型必要描述
ActionString操作接口名,系统规定参数取值:DescribeDomainTopUrlVisit
DomainNameString只支持一个域名,若参数为空,默认返回所有加速域名合并后数据
StartTimeString获取数据起始时间点,北京时间。格式为:YYYY-MM-DD不写默认读取过去24小时数据。


返回参数

名称类型描述
RequestIdString请求ID
DomainNameString加速域名信息
StartTimeString查询指定日期
AllUrlListUrlList[]全部热门URLlist
Url200ListUrlList[]返回为2xx的Urllist
Url300ListUrlList[]返回为3xx的Urllist
Url400ListUrlList[]返回为4xx的Urllist
Url500ListUrlList[]返回为5xx的Urllist


UrlList

名称类型描述
UrlDetailString完整的Url地址
VisitDataString访问次数
VisitProportionFloat访问占比
FlowString流量。单位:byte
FlowProportionFloat流量占比


特殊错误码

错误代码描述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域名配置失败
MissingParameterThe specified value of parameter StartTime is not valid.400缺少StartTime参数
InvalidStartTime.MalformedSpecified start time is malformed.400StartTime格式错误
InvalidStartTime.ValueNotSupportedSpecified end time does not math the specified start time.400当前时间和StartTime差值超过90天


示例


请求示例: http://cdn.aliyuncs.com?Action=DescribeDomainTopUrlVisit&DomainName=test.com
&StartTime=2015-12-03
&<公共请求参数>


返回示例:
JSON格式 {
    "Url300List": {
        "TopUrlVisitModel": []
    },
    "AllUrlList": {
        "UrlList": [
            {
                "VisitData": "161673",
                "UrlDetail": "http://test.com/nn_live/nn_x64/a0.m3u8",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            },
            {
                "VisitData": "37",
                "UrlDetail": "http://test.com/nn_live/nn_x64/ZXg9MQ,,/HNJSMPP360.ts",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            }                      
        ]
    },
    "Url400List": {
        "UrlList": [
            {
                "VisitData": "1884",
                "UrlDetail": "http://test.com/nn_live/nn_x64/aWQ9SE5KU01QUhbGxfcGNfbGl2ZQ,,/HNJSMPP360.m3u8",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            },
            {
                "VisitData": "1",
                "UrlDetail": "http://test.com/nn_live/nn_x64/aWQ9SEEwODgmpbmRleZPTE,/HNJSMPP360.ts",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            }          
        ]
    },
    "RequestId": "64D28B53-5902-409B-94F6-FD46680144FE",
    "DomainName": "test.com",
    "Url200List": {
        "UrlList": [
            {
                "VisitData": "161673",
                "UrlDetail": "http://test.com/nn_live/nn_x64/aWQ9SE5KU0bGxfcGNfbGl2ZQ,,/HNJSMPP360.m3u8",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            },
            {
                "VisitData": "3",
                "UrlDetail": "http://test.com/nn_live/nn_x64/aWQ9SE5KU01QUDMlPTIwMTxMDk5ZXg9MQ,,/HNJSMPP360.ts",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            }
        ]
    },
    "StartTime": "2015-12-03",
    "Url500List": {
        "UrlList": [
            {
                "VisitData": "161673",
                "UrlDetail": "http://test.com/nn_live/nn_x64/aWQ9SE5KU0GNfbGl2ZQ,,/HNJSMPP360.m3u8",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            },          
            {
                "VisitData": "3",
                "UrlDetail": "http://test.com/nn_live/nn_x64/aWQ9SE5KU01QUDZXg9MQ,,/HNJSMPP360.ts",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            }
        ]
    }
}


XML格式: <DescribeDomainTopUrlVisitResponse>
    <Url300List></Url300List>
    <AllUrlList>
        <UrlList>
            <VisitData>161673</VisitData>
            <UrlDetail>http://test.com/nn_live/nn_x64/a0.m3u8</UrlDetail>
            <VisitProportion>0.35</VisitProportion>
            <Flow>460486880</Flow>
            <FlowProportion>0.35</FlowProportion>
        </UrlList>
        <UrlList>
            <VisitData>37</VisitData>
            <UrlDetail>http://test.com/nn_live/nn_x64/ZXg9MQ,,/HNJSMPP360.ts</UrlDetail>
            <VisitProportion>0.35</VisitProportion>
            <Flow>460486880</Flow>
            <FlowProportion>0.35</FlowProportion>
        </UrlList>
    </AllUrlList>
    <Url400List>
        <UrlList>
            <VisitData>1884</VisitData>
            <UrlDetail>http://test.com/nn_live/nn_x64/aWQ9SE5KU01QUhbGxfcGNfbGl2ZQ,,/HNJSMPP360.m3u8</UrlDetail>
            <VisitProportion>0.35</VisitProportion>
            <Flow>460486880</Flow>
            <FlowProportion>0.35</FlowProportion>
        </UrlList>
        <UrlList>
            <VisitData>1</VisitData>
            <UrlDetail>http://test.com/nn_live/nn_x64/aWQ9SEEwODgmpbmRleZPTE,/HNJSMPP360.ts</UrlDetail>
            <VisitProportion>0.35</VisitProportion>
            <Flow>460486880</Flow>
            <FlowProportion>0.35</FlowProportion>
        </UrlList>
    </Url400List>
    <RequestId>64D28B53-5902-409B-94F6-FD46680144FE</RequestId>
    <DomainName>test.com</DomainName>
    <Url200List>
        <UrlList>
            <VisitData>161673</VisitData>
            <UrlDetail>http://test.com/nn_live/nn_x64/aWQ9SE5KU0bGxfcGNfbGl2ZQ,,/HNJSMPP360.m3u8</UrlDetail>
            <VisitProportion>0.35</VisitProportion>
            <Flow>460486880</Flow>
            <FlowProportion>0.35</FlowProportion>
        </UrlList>
        <UrlList>
            <VisitData>3</VisitData>
            <UrlDetail>http://test.com/nn_live/nn_x64/aWQ9SE5KU01QUDMlPTIwMTxMDk5ZXg9MQ,,/HNJSMPP360.ts</UrlDetail>
            <VisitProportion>0.35</VisitProportion>
            <Flow>460486880</Flow>
            <FlowProportion>0.35</FlowProportion>
        </UrlList>
    </Url200List>
    <StartTime>2015-12-03</StartTime>
    <Url500List>
        <UrlList>
            <VisitData>161673</VisitData>
            <UrlDetail>http://test.com/nn_live/nn_x64/aWQ9SE5KU0GNfbGl2ZQ,,/HNJSMPP360.m3u8</UrlDetail>
            <VisitProportion>0.35</VisitProportion>
            <Flow>460486880</Flow>
            <FlowProportion>0.35</FlowProportion>
        </UrlList>
        <UrlList>
            <VisitData>3</VisitData>
            <UrlDetail>http://test.com/nn_live/nn_x64/aWQ9SE5KU01QUDZXg9MQ,,/HNJSMPP360.ts</UrlDetail>
            <VisitProportion>0.35</VisitProportion>
            <Flow>460486880</Flow>
            <FlowProportion>0.35</FlowProportion>
        </UrlList>
    </Url500List>
</DescribeDomainTopUrlVisitResponse>

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

相关电子书

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