文档中心 API文档 查询多域名的URL来源排行

查询多域名的URL来源排行

更新时间:2023-10-18 15:35:44

适用产品

网页加速

接口描述

查询多域名的URL来源排行

调用频率

单用户调用频率:300/5min

推荐使用 Open API在线调试

Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试

请求参数

Body 参数

参数名称类型必填描述
dateFrom
String开始时间: 1.格式为yyyy-MM-ddTHH:mm:ss+08:00,例如,2016-12-02T10:00:00+08:00(为北京时间2016年12月2日10点0分0秒); 2.不能大于当前时间; 3.最多可获取最近半年(183天)的数据。
dateTo
String结束时间: 1.格式为yyyy-MM-ddTHH:mm:ss+08:00; 2.结束时间需大于开始时间; 3.结束时间如果大于当前时间,取当前时间; 4.dateFrom,dateTo二者都未传,默认查询过去的24小时;如仅有一个未传,抛异常; 5.允许查询最大间隔:31天,即dateFrom和dateTo相差不能超过31天。
domain
List域名: 1.未传递domain时:查询账号下所有全部域名(域名超过20个则报错,可联系技术支持调整)。 2.有传递domain时:域名最多支持传20个(可联系技术支持调整); 3.自动过滤掉无效域名,(如传递非法域名,会被过滤掉,查询结果只返回有效域名的数据)。
areaCode
List加速区域: 未传递areaCode时,默认查询所有加速区域。
orderBy
String排序: 1.request或flow; 2.不传默认request; 3.值为request时查询结果按照请求数降序排列;值为flow时查询结果按照流量值降序排列。
top
Integer排行: 不传默认top10,有传最大top200。

返回参数

Body 参数

参数名称类型描述
code
String请求结果状态码
message
String请求结果信息
data
List请求结果的详细数据
url
StringURL
request
String请求数
flow
String流量值,单位MB,保留2位小数

错误码

错误代码(code)描述(message)HTTP状态码语义
24102014This operation requires a body. Ensure that the body is present and the Content-Type header is set.400请求体没有传递
24102013The accept header specified in your request is not acceptable.400Accept请求头不支持,接口仅支持json和xml格式,默认为json格式
24102020The value of X-Time-Zone header specified in your request in invalid.400请求头时区不合法
24102002There was an error in the body of your HTTP request.400请求体格式错误
24102006The date specified is invalid.400dateFrom或dateTo不符合规范或时间区间不合法
24102007You cannot specify a period greater than xx minutes.400dateFrom和dateTo相差超过限制值
24102019The request was rejected because the number of domain(xx) exceeds the limit (xx).400传递的域名个数超过账号限制
24102008param: domain is null or invalid.400参数domain不符合规范
24102008param: orderBy is null or invalid.400参数orderBy不符合规范
24102500We encountered an internal error. Please try again.500系统发生错误

示例

JSON
JSON
请求示例
复制代码 复制成功
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://open.chinanetcenter.com/api/report/domain/referer-url" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
"dateFrom": "2022-05-19T00:00:00+08:00",
"dateTo": "2022-05-19T11:00:00+08:00",
"domain": ["aaaa.com"],
"orderBy":"flow"
}'
返回示例
复制代码 复制成功
{
    "code": "0",
    "message": "success",
    "data": [
        {
            "url": "https://aaaa.com/ikuewrew",
            "request": 93453453454,
            "totalFlow": "9098.77"
        },
        {
            "url": "https://aaaa.com/ret32452",
            "request": 43900435435,
            "totalFlow": "2378.57"
        },
        {
            "url": "https://aaaa.com/3333",
            "request": 78568534523,
            "totalFlow": "856.23"
        },
        {
            "url": "https://aaaa.com/4544",
            "request": 76345234,
            "totalFlow": "354.44"
        },
        {
            "url": "https://aaaa.com/235ffff2",
            "request": 3482379456,
            "totalFlow": "325.43"
        },
        {
            "url": "https://aaaa.com/23fds423",
            "request": 23783453456,
            "totalFlow": "234.33"
        },
        {
            "url": "https://aaaa.com/sar3",
            "request": 124124122222,
            "totalFlow": "72.15"
        },
        {
            "url": "https://aaaa.com/1212",
            "request": 3242344234,
            "totalFlow": "6.54"
        },
        {
            "url": "https://aaaa.com/efsar32",
            "request": 345756346347,
            "totalFlow": "3.84"
        },
        {
            "url": "https://aaaa.com/2345",
            "request": 325346554,
            "totalFlow": "0.55"
        }
    ]
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!