数据统计接口¶
POST 查询访问监控数据 statistics:access:query¶
POST /prod-api/cdn/layer7/statistic/v2/describeL7Data
Body 请求参数
{
"action": [
{
"metricName": "statusCodeTrend"
},
{
"metricName": "requestTimeTrend"
}
],
"interval": "1m",
"domains": [],
"params": {
"beginTime": "2026-05-18 05:36:44",
"endTime": "2026-05-18 11:36:44"
}
}
请求参数¶
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Authorization | header | string | 是 | - | |
| body | body | object | 是 | - | |
| » action | body | [object] | 是 | action | - |
| »» metricName | body | string | 是 | metricName | 查询的统计指标,取值有: |
| »» pageNo | body | integer(int32) | 否 | 当前页数 | - |
| »» pageSize | body | integer(int32) | 否 | 每页显示条目个数 | - |
| » domains | body | [string] | 是 | 域名 | - |
| » interval | body | string | 是 | 统计粒度 | 统计粒度,取值有: |
| » otherFilter | body | [StatisticOtherFilterVO] | 否 | - | |
| »» StatisticOtherFilterVO | body | StatisticOtherFilterVO | 否 | StatisticOtherFilterVO | - |
| »»» oneVal | body | string | 否 | - | |
| »»» threeVal | body | [string] | 否 | - | |
| »»» threeVals | body | [string] | 否 | - | |
| »»» twoVal | body | string | 否 | - | |
| » params | body | object | 否 | - | |
| »» beginTime | body | string | 否 | 开始时间 | - |
| »» endTime | body | string | 否 | 结束时间 | - |
详细说明¶
»» metricName: 查询的统计指标,取值有: statusCodeTrend:表示状态码趋势图; requestTimeTrend:表示请求平均时长趋势图;
» interval: 统计粒度,取值有: 1m:1分钟; 5m:5分钟; 1h:1小时; 1d:1天。
返回示例
OK
{
"msg": "成功",
"code": 200,
"data": [
{
"metricName": "statusCodeTrend",
"objectArrayListMap": {
"list5xx": [
[1779053820000, 0],
[1779053880000, 0],
[1779053940000, 0],
[1779075300000, 0],
[1779075360000, 0]
]
},
"totalMap": {
"list5xx": 0,
"list4xx": 0,
"list3xx": 0,
"list2xx": 1,
"list1xx": 0
}
}
]
}
{
"msg": "成功",
"code": 200,
"data": [
{
"metricName": "statusCodeTrend",
"objectArrayListMap": {
"list5xx": [
[1779053820000, 0],
[1779053880000, 0],
[1779068400000, 0],
[1779068460000, 0],
[1779068520000, 0],
[1779068580000, 0],
[1779068640000, 0],
[1779068700000, 0],
[1779068760000, 0],
[1779075240000, 0],
[1779075300000, 0],
[1779075360000, 0]
]
},
"totalMap": {
"list5xx": 0,
"list4xx": 0,
"list3xx": 0,
"list2xx": 1,
"list1xx": 0
}
},
{
"metricName": "requestTimeTrend",
"objectArrayListMap": {
"requestTime": [
[1779053820000, 0],
[1779053880000, 0],
[1779075300000, 0],
[1779075360000, 0]
]
}
}
]
}
返回结果¶
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | OK | Inline |
| 201 | Created | Created | - |
| 401 | Unauthorized | Unauthorized | - |
| 403 | Forbidden | Forbidden | - |
| 404 | Not Found | Not Found | - |
返回数据结构¶
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » msg | string | true | - | - | |
| » code | integer | true | - | - | |
| » data | [object] | true | - | 数据 | - |
| »» metricName | string | true | - | metricName | - |
| »» objectArrayListMap | object | true | - | 返回数据列表 | - |
| »»» list5xx | [array] | false | - | 5xx | - |
| »»» list4xx | [array] | false | - | 4xx | - |
| »»» list3xx | [array] | false | - | 3xx | - |
| »»» list2xx | [array] | false | - | 2xx | - |
| »»» list1xx | [array] | false | - | 1xx | - |
| »»» requestTime | [array] | true | - | - |
oneOf
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| »»»» anonymous | integer | false | - | - |
xor
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| »»»» anonymous | number | false | - | - |
continued
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| totalMap | object | false | - | 总数量 | - |
| » list5xx | integer | true | - | - | |
| » list4xx | integer | true | - | - | |
| » list3xx | integer | true | - | - | |
| » list2xx | integer | true | - | - | |
| » list1xx | integer | true | - | - |
数据模型¶
Action
Action
属性¶
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| metricName | string | true | - | metricName | - |
| pageNo | integer(int32) | false | - | 当前页数 | - |
| pageSize | integer(int32) | false | - | 每页显示条目个数 | - |
StatisticOtherFilterVO
StatisticOtherFilterVO
属性¶
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| oneVal | string | false | - | - | |
| threeVal | [string] | false | - | - | |
| twoVal | string | false | - | - |