Authentication¶
数据统计接口¶
POST 查询访问监控数据 statistics:access:query¶
POST /prod-apicdn/layer7/statistic/v2/describeL7Data
Body 请求参数
{
"interval": "1m",
"params": {
"beginTime": "2025-04-09 00:00:00",
"endTime": "2025-04-09 23:59:59"
},
"action": [
{
"metricName": "trafficTrend"
},
{
"metricName": "bandwidthTrend"
},
{
"metricName": "requestTrend"
},
{
"metricName": "statusCodeTrend"
},
{
"metricName": "requestTimeTrend"
},
{
"pageSize": 10,
"pageNo": 1,
"metricName": "trafficRank"
},
{
"pageSize": 10,
"pageNo": 1,
"metricName": "requestRank"
}
],
"domains": []
}
请求参数¶
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 否 | none | |
body | body | object | 否 | none | |
» action | body | [object] | 是 | none | |
»» metricName | body | string | 否 | 数据名称 | metricName:“trafficTrend(流量统计图)” |
»» pageNo | body | integer(int32) | 否 | 当前页数 | none |
»» pageSize | body | integer(int32) | 否 | 每页显示条目个数 | none |
» domains | body | [string] | 是 | 域名 | none |
» interval | body | string | 是 | 统计粒度 | 1m:1 分钟 5m:5 分钟 1h:1 小时 1d:1 天 |
» params | body | object | 是 | none | |
»» beginTime | body | string | 是 | 开始时间 | none |
»» endTime | body | string | 是 | 结束时间 | none |
详细说明¶
»» metricName: metricName:“trafficTrend(流量统计图)” metricName:“trafficRank(流量数据概览)” metricName:“bandwidthTrend(带宽统计图)” metricName:“requestTrend(请求数统计图)” metricName:“requestRank(请求数数据概览)” metricName:“statusCodeTrend(状态码统计图)” metricName:“statusCodeRank(状态码数据概览)” metricName:“requestTimeTrend(请求平均时长统计图)”
返回示例
{
"msg": "成功",
"code": 200,
"data": [
{
"metricName": "trafficTrend",
"objectArrayListMap": {
"upstreamBytesSent": [],
"totalBytesSent": [],
"bytesSent": []
},
"totalMap": {
"upstreamBytesSent": 0,
"totalBytesSent": 0,
"bytesSent": 0
}
},
{
"metricName": "trafficRank",
"list": [],
"total": 0
}
]
}
{
"msg": "成功",
"code": 200,
"data": [
{
"metricName": "trafficTrend",
"objectArrayListMap": {
"upstreamBytesSent": [],
"totalBytesSent": [],
"bytesSent": []
},
"totalMap": {
"upstreamBytesSent": 0,
"totalBytesSent": 0,
"bytesSent": 0
}
},
{
"metricName": "bandwidthTrend",
"objectArrayListMap": {
"upstreamBytesSent": [],
"totalBytesSent": [],
"bytesSent": []
},
"maxMap": {
"upstreamBytesSent": 0,
"totalBytesSent": 0,
"bytesSent95Peak": 0,
"bytesSent": 0,
"totalBytesSent95Peak": 0,
"upstreamBytesSent95Peak": 0
}
},
{
"metricName": "requestTrend",
"objectArrayListMap": {
"requestCounter": []
},
"totalMap": {
"requestCounter": 0
}
},
{
"metricName": "statusCodeTrend",
"objectArrayListMap": {
"list5xx": [],
"list4xx": [],
"list3xx": [],
"list2xx": [],
"list1xx": []
},
"totalMap": {
"1xx": 0,
"2xx": 0,
"3xx": 0,
"4xx": 0,
"5xx": 0
}
},
{
"metricName": "requestTimeTrend",
"objectArrayListMap": {
"requestTime": []
}
},
{
"metricName": "trafficRank",
"list": [],
"total": 0
},
{
"metricName": "requestRank",
"list": [],
"total": 0
}
]
}
201 Response
返回结果¶
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | none | Inline |
201 | Created | 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 | |
»» metricName | string | true | none | 数据名称 | metricName:“trafficTrend(流量统计图)” metricName:“trafficRank(流量数据概览)” metricName:“bandwidthTrend(带宽统计图)” metricName:“requestTrend(请求数统计图)” metricName:“requestRank(请求数数据概览)” metricName:“statusCodeTrend(状态码统计图)” metricName:“statusCodeRank(状态码数据概览)” metricName:“requestTimeTrend(请求平均时长统计图)” |
»» objectArrayListMap | object | true | none | 统计图 | none |
»»» upstreamBytesSent | [string] | false | none | 上行统计图 | none |
»»» totalBytesSent | [string] | false | none | 总统计图 | none |
»»» bytesSent | [string] | false | none | 下行统计图 | none |
»»» requestCounter | [string] | false | none | 总请求数统计图 | none |
»»» list5xx | [string] | false | none | 5xx 统计图 | none |
»»» list4xx | [string] | false | none | 4xx 统计图 | none |
»»» list3xx | [string] | false | none | 3xx 统计图 | none |
»»» list2xx | [string] | false | none | 2xx 统计图 | none |
»»» list1xx | [string] | false | none | 1xx 统计图 | none |
»»» requestTime | [string] | true | none | 请求平均时长统计图 | none |
»» totalMap | object | true | none | 统计数据 | none |
»»» upstreamBytesSent | integer | false | none | 上行数量 | none |
»»» totalBytesSent | integer | false | none | 总数量 | none |
»»» bytesSent | integer | false | none | 下行数量 | none |
»»» requestCounter | integer | false | none | 总请求数 | none |
»»» 1xx | integer | true | none | 1xx | none |
»»» 2xx | integer | true | none | 2xx | none |
»»» 3xx | integer | true | none | 3xx | none |
»»» 4xx | integer | true | none | 4xx | none |
»»» 5xx | integer | true | none | 5xx | none |
»» maxMap | object | false | none | none | |
»»» upstreamBytesSent | integer | true | none | 上行数量 | none |
»»» totalBytesSent | integer | true | none | 总数量 | none |
»»» bytesSent95Peak | integer | true | none | 下行 95 数量 | none |
»»» bytesSent | integer | true | none | 下行数量 | none |
»»» totalBytesSent95Peak | integer | true | none | 总的 95 数量 | none |
»»» upstreamBytesSent95Peak | integer | true | none | 上行 95 数量 | none |
»» list | [string] | true | none | none | |
»» total | integer | true | none | none |
数据模型¶
Action
Action
属性¶
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
metricName | string | false | none | none | |
pageNo | integer(int32) | false | none | 当前页数 | none |
pageSize | integer(int32) | false | none | 每页显示条目个数 | none |
StatisticOtherFilterVO
StatisticOtherFilterVO
属性¶
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
oneVal | string | false | none | none | |
threeVal | [string] | false | none | none | |
threeVals | [string] | false | none | none | |
twoVal | string | false | none | none |
L7QueryStatisticV2VO
{
"action": [
{
"metricName": "string",
"pageNo": 0,
"pageSize": 0
}
],
"domains": ["string"],
"interval": "string",
"mostDimension": "string",
"otherFilter": [
{
"oneVal": "string",
"threeVal": ["string"],
"threeVals": ["string"],
"twoVal": "string"
}
],
"pageNum": 0,
"pageSize": 0,
"params": {
"beginTime": "string",
"endTime": "string"
},
"searchHeader": {},
"terminal": "string",
"userId": 0
}
L7QueryStatisticV2VO
属性¶
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
action | [Action] | true | none | none | |
domains | [string] | true | none | 域名 | none |
interval | string | true | none | 统计粒度 | 1m:1 分钟 5m:5 分钟 1h:1 小时 1d:1 天 |
mostDimension | string | false | none | none | |
otherFilter | [StatisticOtherFilterVO] | false | none | none | |
pageNum | integer(int32) | false | none | none | |
pageSize | integer(int32) | false | none | none | |
params | object | true | none | none | |
» beginTime | string | true | none | 开始时间 | none |
» endTime | string | true | none | 结束时间 | none |
searchHeader | object | false | none | none | |
terminal | string | false | none | none | |
userId | integer(int64) | false | none | none |