查询分节点计费方案用户的带宽用量
更新时间:2021-08-02
接口描述
本接口用于查询分节点计费方案用户的带宽用量数据。
请求结构
GET /v1/usage/traffic/region HTTP/1.1
Host: bec.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
beginDate | String | 是 | Query参数 | 查询开始日期,格式“2020-10-01”。月结方案用户应设置为查询月份的第一天。 |
endDate | String | 是 | Query参数 | 查询结束日期,格式“2020-10-31”。月结方案用户应设置为查询月份的最后一天,最长时间跨度31天。 |
响应头域
除公共头域外,无其它特殊头域。
响应参数
参数名称 | 类型 | 描述 |
---|---|---|
accountId | String | 账户ID |
chargeScheme | String | 计费方案类型 |
timeSpan | Map<String,String> | 查询时间,包含beginDate和endDate |
queryTime | Long | 接口调用时间 |
graphData | Map<String,Map<String,GraphData> | 带宽用量数据 |
topBandwidth | Map<String,List<DataUnit> | 带宽峰值数据 |
monthly95Bandwidth | Map<String,List<DataUnit> | 月95峰带宽数据,适用于月95峰-分节点计费方案用户 |
monthlyTop4Bandwidth | Map<String,List<DataUnit> | 月第四峰带宽数据,适用于月第四峰-分节点计费方案用户 |
错误码
请参照错误返回章节的内容。
请求示例
GET /v1/usage/traffic/sum HTTP/1.1
Host: bec.baidubce.com
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2021-06-08T03:28:09Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
{
"beginDate": "2020-10-01",
"endDate": "2020-10-31"
}
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Wed, 08 Jul 2021 03:28:11 GMT
x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
Server: BWS
{
"accountId": "accountId",
"chargeScheme": "PeakBandwidth_Percent_95_part",
"queryTime": 1605322615000,
"timeSpan": {
"beginDate": "2020-10-01",
"endDate": "2020-10-31"
},
"graphData": {
"EAST_CHINA": {
"EAST_CHINA-GUANGZHOU-CHINA_UNICOM": {
"count": 30,
"dataList": [{
"amount": 123431.21441232,
"unit": "bps",
"timestamp": 1602845549040
},
{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
},
{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}
]
}
},
"NORTH_CHINA": {
"NORTH_CHINA-BEIJING-CHINA_UNICOM": {
"count": 30,
"dataList": [{
"amount": 123431.21441232,
"unit": "bps",
"timestamp": 1602845549040
},
{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
},
{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}
]
},
"NORTH_CHINA-QINGDAO-TRIPLE_LINE": {
"count": 30,
"dataList": [{
"amount": 123431.21441232,
"unit": "bps",
"timestamp": 1602845549040
},
{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
},
{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}
]
}
},
"SOUTH_CHINA": {
"SOUTH_CHINA-GUANGZHOU-CHINA_MOBILE": {
"count": 30,
"dataList": [{
"amount": 123431.21441232,
"unit": "bps",
"timestamp": 1602845549040
},
{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
},
{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}
]
}
}
},
"topBandwidth": {
"EAST_CHINA-GUANGZHOU-CHINA_UNICOM": [{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}],
"NORTH_CHINA-BEIJING-CHINA_UNICOM": [{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}],
"SOUTH_CHINA-GUANGZHOU-CHINA_MOBILE": [{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}],
"NORTH_CHINA-QINGDAO-TRIPLE_LINE": [{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}]
},
"monthly95Bandwidth": {
"EAST_CHINA-GUANGZHOU-CHINA_UNICOM": [{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}],
"NORTH_CHINA-BEIJING-CHINA_UNICOM": [{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}],
"SOUTH_CHINA-GUANGZHOU-CHINA_MOBILE": [{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}],
"NORTH_CHINA-QINGDAO-TRIPLE_LINE": [{
"amount": 21431.34133333,
"unit": "bps",
"timestamp": 1602845549040
}]
}
}
Model对象定义
GraphData
参数名称 | 类型 | 描述 |
---|---|---|
count | int | 数据点数量 |
dataList | List<DataUnit> | 带宽数据 |
DataUnit
参数名称 | 类型 | 描述 |
---|---|---|
amount | BigDecimal | 带宽数值 |
unit | String | 带宽单位 |
timestamp | Long | 带宽时间点 |