文档中心 API文档 频道上传带宽峰值带宽排行

频道上传带宽峰值带宽排行

更新时间:2019-07-18 19:28:11

适用产品

上传加速

接口描述

对频道按照上传带宽峰值排行,可按照边缘上行或中间上行进行排行。输出按照峰值排行后的频道、峰值时间、峰值、总流量

请求参数

Body 参数

XML
参数名称类型必填描述
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)

返回参数

Body 参数

XML
参数名称类型描述
startdate
String开始时间
enddate
String结束时间
channel
String频道
peakValue
String带宽峰值,单位Mbps
peakTime
String峰值时间
totalFlow
String总流量, 带单位,可变

示例

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/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"
                            }
                        ]
                    }
                ]
            }
        ]
    }
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!