文档中心 API文档 查询CDN有流量的服务IP列表

查询CDN有流量的服务IP列表

更新时间:2022-11-17 18:03:12

适用产品

网页加速、下载分发、动态加速、全站加速、点播分发、直播分发、上传加速、移动加速、S-P2P、PCDN、应用性能管理、WEB应用防火墙、BotGuard爬虫管理、WSS、DMS、DDoS云清洗、应用安全加速解决方案、IPv6一体化解决方案、电商安全加速解决方案、金融安全加速解决方案、政企安全加速解决方案、应用安全解决方案、区块链安全加速解决方案、IPv6安全加速解决方案

接口描述

查询CDN有跑流量的服务IP列表

推荐使用 Open API在线调试

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

请求参数

Body 参数

参数名称类型必填描述
domain
List域名: 可传递域名数量上限默认为20个(可联系技术支持调整); 自动过滤掉非法域名(如传递非法域名,会被过滤掉,查询结果只返回合法域名的数据)。

返回参数

Body 参数

参数名称类型描述
result
List结果
domain
String域名
ipList
List域名对应的有流量的服务IP列表

错误码

错误代码(code)描述(message)HTTP状态码语义
NotAcceptableThe accept header specified in your request is not acceptable.400Accept请求头不支持,接口仅支持json和xml格式,默认为json格式
InvalidHTTPRequestThere was an error in the body of your HTTP request.400请求体格式错误
NumberLimitExceededThe request was rejected because the number of domain({actual}) exceeds the limit ({expect})400传递的域名个数超过账号限制
PARAM_INVALIDparam: domain is null or invalid.400参数domain不符合规范
InternalErrorWe encountered an internal error. Please try again.500系统发生错误

示例

JSON
XML
JSON
请求示例
复制代码 复制成功
#!/bin/bash
# Please remember to change the param (-H "X-Time-Zone") in this demo to the TimeZone you want in response

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/server-list/exist-flow" \
-X "POST" \
-H "X-Time-Zone:GMT+08:00" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{"domain": ["www.aaa.com","www.bbb.com"]
}'
返回示例
复制代码 复制成功
{
    "result":[
        {
            "domain":"www.aaa.com",
            "ipList":[
                "1.1.1.1",
                "2.2.2.2"
            ]
        },
        {
            "domain":"www.bbb.com",
            "ipList":[
                "3.3.3.3",
                "4.4.4.4"
            ]
        }
    ]
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!