封禁IP管理
获取封禁IP列表
获取被封禁的IP地址列表,支持分页、过滤和排序
get/api/v1/blocked-ips
Query parameters
pageinteger
页码,从1开始
sizeinteger
每页数量,最大100
ipstring
IP地址过滤,支持模糊匹配
reasonstring
封禁原因过滤
status'active' | 'expired' | 'all'
状态过滤:active-生效中,expired-已过期,all-全部
sortBy'blocked_at' | 'blocked_until' | 'ip'
排序字段
sortDir'asc' | 'desc'
排序方向:asc-升序,desc-降序
Response
获取封禁IP列表成功
Example response
{
"code": 200,
"data": {
"items": [
{
"blockedAt": "2023-12-01T10:00:00Z",
"blockedUntil": "2023-12-01T11:00:00Z",
"ip": "192.168.1.1",
"isActive": true,
"reason": "high_frequency_attack",
"remainingTTL": 3600,
"requestUri": "/api/v1/login"
}
],
"page": 1,
"pages": 10,
"size": 10,
"total": 100
},
"message": "操作成功",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"success": true,
"timestamp": "2023-01-01T12:00:00Z"
}