上传加速
对频道按照上传带宽峰值排行,可按照边缘上行或中间上行进行排行。输出按照峰值排行后的频道、峰值时间、峰值、总流量
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
cust | String | 否 | 合并账号下的某个客户的英文名,当合并账号要查看子客户的信息时,必须填写子客户的英文名 |
date | String | 否 | 查询的日期,日期格式为yyyy-mm-dd,不选或者为空时默认为当天; |
startdate | String | 否 | 查询的起始日期,日期格式为yyyy-mm-dd;此参数需与enddate参数配合,若存在date参数,则该参数无效 |
enddate | String | 否 | 查询的结束日期,日期格式为yyyy-mm-dd;此参数需与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 |
flowType | String | 否 | 带宽类型:edgeUp:边缘上行, midUp:中间上行, 多个类型以英文分号“;”分隔. 空默认为边缘上行(edgeUp) |
参数名称 | 类型 | 描述 |
---|---|---|
startdate | String | 开始时间 |
enddate | String | 结束时间 |
channel | String | 频道 |
peakValue | String | 带宽峰值,单位Mbps |
peakTime | String | 峰值时间 |
totalFlow | 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 "https://open.chinanetcenter.com/myview/bandwidth-upload-peak-ranking" \ -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-upload-peak-ranking", "date":[ { "startdate":"2014-11-04", "enddate":"2014-11-04", "channel":[ { "name":"cs1.test.com;cs1_2.test.com", "channelPeak":[ { "no":"1", "channel":".test.com", "peakTime":"2014-11-04 22:23", "peakValue":"0.02", "totalFlow":"9.13 MB" }, { "no":"2", "channel":".help.test.com", "peakTime":"2014-11-04 00:01", "peakValue":"0.0", "totalFlow":"1.32 MB" }, { "no":"3", "channel":"163.test.com", "peakTime":"2014-11-04 00:01", "peakValue":"0.0", "totalFlow":"0.00 MB" }, { "no":"4", "channel":"2010.test.com", "peakTime":"2014-11-04 00:01", "peakValue":"0.0", "totalFlow":"0.00 MB" }, { "no":"5", "channel":"audio.m.test.net", "peakTime":"2014-11-04 00:01", "peakValue":"0.0", "totalFlow":"0.00 MB" } ] } ] } ] } }