文档中心 API文档 频道带宽区分协议接口

频道带宽区分协议接口

更新时间:2022-02-11 11:08:24

适用产品

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

接口描述

查询分协议带宽情况

推荐使用 Open API在线调试

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

请求参数

Body 参数

参数名称类型必填描述
cust
String合并账号下的某个客户的英文名,当合并账号要查看子客户的信息时,必须填写子客户的英文名
date
String查询的日期,日期格式为yyyy-mm-dd,不选或者为空时默认为当天;
startdate
String查询的起始日期,精确到分钟,日期格式为yyyy-mm-dd hh:MM若没有输入时、分,则时分默认为00:01;此参数需与enddate参数配合,若存在date参数,则该参数无效
enddate
String查询的结束日期,精确到分钟,日期格式为yyyy-mm-dd hh:MM,若没有输入时、分,则时分默认为24:00;此参数需与startdate参数配合,若存在date参数,则该参数无效。
channel
String查询的频道,多个频道值请用英文分号';',不选或者为空时默认为所查询客户的所有频道
isExactMatch
String 频道是否完全匹配,为true时,必须填写完整的域名(此时会过滤用户输入的无效或重复频道,所有输入频道都无效时返403.。不为true时,显示以用户输入的频道为结尾的所有频道。默认为true
region
String查询的加速区域的缩写,多个区域请用英文分号';'分隔开,如查询大陆及亚太区域,参数填写为:'region=cn;apac'。不选或者为空时默认为全部区域。
accetype
String加速类型参数,如accetype=web。多个请用英文分号';'分隔开,不填或值为all表示所有类型
dataformat
String返回结果格式,支持格式为xml和json,默认为xml
resultType
String 结果的显示是否提供合并值。填写1时:只提供合并结果;填写2时:只提供拆分值;填写3时:既提供合并值,又提供拆分值。不选或者为空时默认为'1'。
datatype
String查询的数据类型。填写1时:输出http+https的带宽数据;填写2时:输出http的带宽数据;填写3时:输出https的带宽数据。多个值请用英文分号';'.不选或者为空时默认为'1'。

返回参数

Body 参数

参数名称类型描述
provider
BandwidthChannelProtocolResponseProvider结果
name
String租户
type
String接口类型
resultType
String统计类型
date
BandwidthChannelProtocolResponseProviderDate频道带宽区分协议带宽数据
startdate
String开始时间
enddate
String结束时间
channel
BandwidthChannelProtocolResponseProviderDateChannel频道
name
String频道
bandwidth
List频道带宽区分协议带宽数据
time
String时间点
total
String{'en':'total bandwidth of http and https,unit Mbps.This value only displays When parameter 'datatype' is not specified or includes '1'.', 'zh_CN':'带宽'}
http
String{'en':'http bandwidth,unit Mbps.This value only displays when parameter 'datatype' includes '2'.', 'zh_CN':'http类型的带宽,单位:Mbps(当入参datatype包含2时有值)'}
https
String{'en':'http2 bandwidth,unit Mbps.This value only displays when parameter 'datatype' includes '3'.', 'zh_CN':'https类型的带宽,单位:Mbps(当入参datatype包含3时有值)'}

示例

JSON
XML
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/myview/BandwidthChannelProtocol" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/xml" \
-d "channel=test.com&startdate=2018-02-02&enddate=2018-02-03&dataformat=json"
返回示例
复制代码 复制成功
{
    "provider":{
        "name":"${ProviderName}",
        "type":"bandwidth-channel-protocol",
        "resultType":"1",
        "date":{
            "name":"2017-07-20",
            "peakValue":"6.27 Mbps",
            "peakTime":"2017-07-20 17:55:00",
            "totalFlow":"11.37 GB",
            "channel":{
                "name":"test.com",
                "bandwidth":[
                    {
                        "time":"2017-07-20 00:05:00",
                        "total":"0.16493",
                        "http":"0.16632",
                        "https":"0.0"
                    },
                    {
                        "time":"2017-07-20 00:10:00",
                        "total":"0.15077",
                        "http":"0.14935",
                        "https":"0.0"
                    },
                    {
                        "time":"2017-07-20 24:00:00",
                        "total":"0.40642",
                        "http":"0.4055",
                        "https":"0.0"
                    }
                ]
            }
        }
    }
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!