---
title: "获取封禁IP列表"
method: GET
path: "/api/v1/blocked-ips"
tags: ["封禁IP管理"]
---

# 获取封禁IP列表

`GET /api/v1/blocked-ips`

获取被封禁的IP地址列表，支持分页、过滤和排序

## Query parameters

- `page` integer
- `size` integer
- `ip` string
- `reason` string
- `status` 'active' | 'expired' | 'all'
- `sortBy` 'blocked_at' | 'blocked_until' | 'ip'
- `sortDir` 'asc' | 'desc'

## Response `200`

获取封禁IP列表成功

- object — 成功的API响应标准格式
  - `code` integer
  - `data` DtoBlockedIPListResponse — 封禁IP分页列表响应
    - `items` DtoBlockedIPResponse[] — IP列表
      - `blockedAt` string — 封禁开始时间
      - `blockedUntil` string — 封禁结束时间
      - `ip` string — 被封禁的IP地址
      - `isActive` boolean — 是否仍在封禁中
      - `reason` string — 封禁原因
      - `remainingTTL` integer — 剩余封禁时间（秒）
      - `requestUri` string — 请求URI
    - `page` integer — 当前页码
    - `pages` integer — 总页数
    - `size` integer — 每页数量
    - `total` integer — 总数量
  - `message` string
  - `requestId` string
  - `success` boolean
  - `timestamp` string

## Other responses

- `400` — 请求参数错误
- `401` — 未授权访问
- `403` — 禁止访问
- `500` — 服务器内部错误

---

[API](https://skmtc.net/labring/apis/ruiqi-waf-api.md) · [All operations](https://skmtc.net/labring/apis/ruiqi-waf-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/labring/ruiqi-waf-api/revisions/aaacd7e06a88/schema)
