网页加速、下载分发、动态加速、全站加速、点播分发、直播分发、上传加速、移动加速、S-P2P、PCDN、应用性能管理、WEB应用防火墙、BotGuard爬虫管理、WSS、DMS、DDoS云清洗、应用安全加速解决方案、IPv6一体化解决方案、电商安全加速解决方案、金融安全加速解决方案、政企安全加速解决方案、应用安全解决方案、区块链安全加速解决方案、IPv6安全加速解决方案
查询域名带宽,输出分钟粒度的带宽和对应计费信息。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
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 | 否 | 查询的频道,多个频道值请用英文分号';',不选或者为空时默认为所查询客户的所有频道 |
region | String | 否 | 查询的加速区域的缩写,多个区域请用英文分号';'分隔开,如查询大陆及亚太区域,参数填写为:'region=cn;apac'。不选或者为空时默认为全部区域。 |
accetype | String | 否 | 加速类型参数,如accetype=web。多个请用英文分号';'分隔开,不填或值为all表示所有类型 |
dataformat | String | 否 | 返回结果格式,支持格式为xml和json,默认为xml |
isExactMatch | String | 否 | 频道是否完全匹配,为true时,必须填写完整的域名(此时会过滤用户输入的无效或重复频道,所有输入频道都无效时返403.。不为true时,显示以用户输入的频道为结尾的所有频道。默认为true |
ispId | String | 否 | 要查询的运营商的缩写,多个isp请用英文分号';'分隔开。运营商的缩写格式参考附录:具体运行商(ISP)信息的代号。备注:只有当地区只写了'cn'时,填写isp信息才有效。不选或者为空时默认为所有isp。 |
ipProtocol | String | 否 | ipv4、ipv6,不填默认查全部 |
bandwidthType | String | 否 | 带宽类型:in:流入带宽,out:流出带宽;ein:外网流入带宽,eout:外网流出带宽。 |
node | String | 否 | 节点名称 |
optionalFields | String | 否 | chargeInfo:计费时间计费方式、计费值、95值 |
参数名称 | 类型 | 描述 |
---|---|---|
provider | BandwidthVmResponseProvider | 结果 |
name | String | 租户 |
type | String | 接口类型 |
date | BandwidthVmResponseProviderDate | 频道带宽数据 |
startdate | String | 开始时间 |
enddate | String | 结束时间 |
channel | BandwidthVmResponseProviderDateChannel | 频道 |
name | String | 频道 |
bandwidth | List | 带宽数据 |
time | String | 时间点 |
text | String | 带宽 |
#!/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 "http://open.chinanetcenter.com/api/bandwidth-vm" \ -X "POST" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/xml" \ -d "channel=test.com&startdate=2017-06-17&enddate=2017-06-17"
<provider name="ChinaNetCenter" type="bandwidth-bm.vm"> <date name="2017-06-17" peakAvg="122089.16 Mbps"> <channel name="test.com"> <in time="2017-06-17 00:05:00">30143.11</in> <in time="2017-06-17 00:10:00">29297.55</in> <in time="2017-06-17 00:15:00">28364.58</in> <in time="2017-06-17 00:20:00">26726.35</in> …… <out time="2017-06-17 00:05:00">35209.03</out> <out time="2017-06-17 00:10:00">34093.14</out> <out time="2017-06-17 00:15:00">33039.07</out> <out time="2017-06-17 00:20:00">30897.98</out> …… <ein time="2017-06-17 00:05:00">25952.29</ein> <ein time="2017-06-17 00:10:00">24760.43</ein> <ein time="2017-06-17 00:15:00">23806.50</ein> <ein time="2017-06-17 00:20:00">22419.80</ein> …… <eout time="2017-06-17 00:05:00">30784.72</eout> <eout time="2017-06-17 00:10:00">29405.47</eout> <eout time="2017-06-17 00:15:00">28377.90</eout> <eout time="2017-06-17 00:20:00">26510.65</eout> …… <total time="2017-06-17 00:05:00">122089.16</total> <total time="2017-06-17 00:10:00">117556.60</total> <total time="2017-06-17 00:15:00">113588.05</total> <total time="2017-06-17 00:20:00">106554.79</total> …… </channel> </date> </provider>