统计信息
获取时间序列数据
获取指定时间范围和指标类型的时间序列数据,用于图表展示
get/api/v1/stats/time-series
Query parameters
timeRange'24h' | '7d' | '30d' required
时间范围:24h(24小时)、7d(7天)、30d(30天)
metric'requests' | 'blocks' required
指标类型:requests(请求数)、blocks(拦截数)
Response
获取时间序列数据成功
Example response
{
"code": 200,
"data": {
"data": [
{
"timestamp": "2024-01-01T12:00:00Z",
"value": 128
}
],
"metric": "requests",
"timeRange": "24h"
},
"message": "操作成功",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"success": true,
"timestamp": "2023-01-01T12:00:00Z"
}