openapi: 3.2.0 info: description: mgt API swagger document. title: mgt Ipgroup API contact: {} version: '2.0' servers: - url: /api tags: - name: IP Group paths: /open/ipgroup: get: tags: - IP Group summary: list ip group parameters: - name: top in: query x-cli-description: 返回前 N 条 schema: type: integer responses: '200': description: OK content: application/json: schema: allOf: - $ref: '#/components/schemas/response.JSONBody' - type: object properties: data: $ref: '#/components/schemas/api.GetIPGroupRes' x-cli-summary: 获取 IP Group 列表 operationId: getOpenIpgroup x-operation-id-source: derived post: tags: - IP Group summary: create ip group responses: '200': description: OK content: application/json: schema: allOf: - $ref: '#/components/schemas/response.JSONBody' - type: object properties: data: type: integer x-cli-summary: 创建 IP Group requestBody: content: application/json: schema: $ref: '#/components/schemas/ipg.IPGroupVO' description: request params required: true operationId: postOpenIpgroup x-operation-id-source: derived put: tags: - IP Group summary: update ip group responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/response.JSONBody' x-cli-summary: 更新 IP Group requestBody: content: application/json: schema: $ref: '#/components/schemas/ipg.IPGroupVO' description: request params required: true operationId: putOpenIpgroup x-operation-id-source: derived delete: tags: - IP Group summary: delete ip group responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/response.JSONBody' x-cli-summary: 删除 IP Group requestBody: content: application/json: schema: $ref: '#/components/schemas/api.DeleteIPGroupReq' description: request params required: true operationId: deleteOpenIpgroup x-operation-id-source: derived /open/ipgroup/append: post: tags: - IP Group summary: add ip to ip group responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/response.JSONBody' x-cli-summary: 添加 IP 到 IP Group requestBody: content: application/json: schema: $ref: '#/components/schemas/api.PostAppendIPGroupRequest' description: request params required: true operationId: postOpenIpgroupAppend x-operation-id-source: derived /open/ipgroup/detail: get: tags: - IP Group summary: get ip group detail parameters: - name: id in: query x-cli-description: 资源 ID schema: type: integer responses: '200': description: OK content: application/json: schema: allOf: - $ref: '#/components/schemas/response.JSONBody' - type: object properties: data: $ref: '#/components/schemas/api.GetIPGroupDetailRes' x-cli-summary: 获取 IP Group 详情 operationId: getOpenIpgroupDetail x-operation-id-source: derived components: schemas: api.GetIPGroupRes: type: object properties: nodes: type: array items: $ref: '#/components/schemas/ipg.IPGroupVO' total: type: integer api.DeleteIPGroupReq: type: object properties: ids: type: array items: type: integer api.PostAppendIPGroupRequest: type: object properties: ip_group_ids: type: array items: type: integer ips: type: array items: type: string ipg.IPGroupVO: type: object properties: builtin: type: boolean comment: type: string id: type: integer ips: type: array items: type: string reference: type: string total: type: integer updated_at: type: string api.GetIPGroupDetailRes: type: object properties: data: $ref: '#/components/schemas/ipg.IPGroupVO' response.JSONBody: type: object properties: data: {} err: type: string msg: type: string x-cli: tags: site: 防护站点管理 cert: 授权与证书管理 log: 日志查询 stat: 数据统计 skynet: 加强规则管理 module: 语义分析模块配置 rule: 自定义规则管理 ipgroup: IP 黑白名单管理 children: log/attack: 攻击日志 log/audit: 审计日志 log/rule: 黑白名单检测日志 stat/trend: 趋势统计 params: server_names: 域名(多个用逗号分隔) ports: 端口(多个用逗号分隔) upstreams: 后端地址(多个用逗号分隔) cert_id: 证书 ID comment: 备注说明 email: 管理员邮箱 group_id: 分组 ID health_check: 是否启用健康检查 id: 资源 ID ids: 资源 ID(多个用逗号分隔) site: 站点域名 sp_enabled: 是否启用语义分析 stat_enabled: 是否启用统计 load_balance: 负载均衡策略 name: 规则名称 pattern: 匹配规则(JSON 格式) action: 动作类型:0-放行 1-阻断 2-挑战 3-认证防护 4-混淆 5-等待室 level: 风险等级 enable: 是否启用 mode: 模式:strict/default/dry_run/disable/deny semantics: 语义分析配置 use_global: 是否使用全局配置 ips: IP 地址(多个用逗号分隔) ip_group_ids: IP Group ID(多个用逗号分隔) page: 页码 page_size: 每页数量 size: 每页数量 start: 开始时间戳(秒) end: 结束时间戳(秒) begin_time: 开始时间戳(秒) end_time: 结束时间戳(秒) site_id: 站点 ID host: 域名 ip: IP 地址 url: URL 路径 port: 端口 attack_type: 攻击类型 event_id: 事件 ID ja4_fingerprint: JA4 指纹 top: 返回前 N 条 reference: 引用来源 expire: 过期时间 log: 是否记录日志 is_enabled: 是否启用 global: 是否全局