用量监控¶
GET 获取套餐¶
GET /prod-api/cdn/domain/getPackages
获取套餐
请求参数¶
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
Authorization | header | string | 否 | none |
返回示例
{
"msg": "操作成功",
"code": 200,
"data": [
{
"label": "11123",
"value": "20220825123456"
},
{
"label": "1111122",
"value": "20231213190456877"
}
]
}
401 Response
返回结果¶
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | none | Inline |
401 | Unauthorized | none | Inline |
403 | Forbidden | none | Inline |
404 | Not Found | none | Inline |
返回数据结构¶
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» msg | string | true | none | none | |
» code | integer | true | none | none | |
» data | [object] | true | none | none | |
»» label | string | false | none | 标签 | none |
»» value | string | false | none | 值 | none |
数据统计接口¶
POST 用量监控数据¶
POST /prod-api/cdn/layer7/statistic/describeL7UsageData
Body 请求参数
{
"interval": "1m",
"oids": ["20240412279000084616"],
"params": {
"beginTime": "2024-11-25 00:00:00",
"endTime": "2024-11-25 23:59:59"
},
"action": [
{
"metricName": "totalTraffic"
},
{
"metricName": "trafficTrend"
},
{
"metricName": "bandwidthTrend"
}
{
"metricName": "totalBandwidth"
}
]
}
请求参数¶
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» interval | body | string | 是 | 统计粒度 | 1m:1 分钟 5m:5 分钟 1h:1 小时 1d:1 天 |
» oids | body | [string] | 是 | 套餐 ID | none |
» params | body | object | 是 | none | |
»» beginTime | body | string | 是 | 开始时间 | none |
»» endTime | body | string | 是 | 结束时间 | none |
» action | body | [object] | 是 | none | |
»» metricName | body | string | 是 | 获取数据名称 | metricName:“trafficTrend(流量统计图)” |
详细说明¶
»» metricName: metricName:“trafficTrend(流量统计图)” metricName:“totalTraffic(流量数据概览)” metricName:“bandwidthTrend(带宽统计图)” metricName:“totalBandwidth(带宽数据概览)”
返回示例
200 Response
{
"msg": "成功",
"code": 200,
"data": [
{
"metricName": "trafficTrend",
"objectArrayListMap": {
"inTraffic": [
[1732464060000, 15229],
[1732462560000, 2246]
],
"ouTraffic": [
[1732464060000, 15229],
[1732462560000, 2246]
],
"totalTraffic": [
[1732464060000, 15229],
[1732462560000, 2246]
]
},
"totalMap": {
"inTotalTraffic": 0,
"outTotalTraffic": 0,
"totalTraffic": 0
}
},
{
"metricName": "bandwidthTrend",
"objectArrayListMap": {
"inBandwidth": [
[1732464060000, 15229],
[1732462560000, 2246]
],
"outBandwidth": [
[1732464060000, 15229],
[1732462560000, 2246]
],
"totalBandwidth": [
[1732464060000, 15229],
[1732462560000, 2246]
]
},
"totalMap": {
"maxInBandwidth": 0,
"maxOutBandwidth": 0,
"maxTotalBandwidth": 0
}
}
]
}
返回结果¶
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | none | Inline |
返回数据结构¶
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» msg | string | true | none | none | |
» code | integer | true | none | none | |
» data | [object] | true | none | none | |
»» metricName | string | true | none | 获取数据名称 | none |
»» objectArrayListMap | object | true | none | none | |
»»» inTraffic | [array] | false | none | 入流量趋势 | none |
»»» ouTraffic | [array] | false | none | 出流量趋势 | none |
»»» totalTraffic | [array] | false | none | 总流量趋势 | none |
»»» inBandwidth | [array] | true | none | 入带宽峰值趋势 | none |
»»» outBandwidth | [array] | true | none | 出带宽峰值趋势 | none |
»»» totalBandwidth | [array] | true | none | 总带宽峰值趋势 | none |
»» totalMap | object | true | none | none | |
»»» inTotalTraffic | integer | false | none | 总入流量 | none |
»»» outTotalTraffic | integer | false | none | 总出流量 | none |
»»» totalTraffic | integer | false | none | 总流量 | none |
»»» maxInBandwidth | integer | true | none | 下行带宽峰值 | none |
»»» maxOutBandwidth | integer | true | none | 上行带宽峰值 | none |
»»» maxTotalBandwidth | integer | true | none | 总带宽峰值 | none |