aaacd7e06a88

latestSwagger 2.0Apache 2.02026-07-174372196.9 KB
配置管理

更新系统配置

使用补丁方式更新系统配置

patch/api/v1/config

Request body

isDebugboolean

是否开启调试模式

isK8sboolean

是否在K8s环境

isResponseCheckboolean

是否检查响应

namestring

配置名称

Example request

{
  "engine": {
    "appConfig": [
      {
        "logFile": "/dev/stdout",
        "logFormat": "console",
        "logLevel": "info",
        "name": "coraza",
        "transactionTTL": 60000
      }
    ],
    "asnDBPath": "/opt/geoip/GeoLite2-ASN.mmdb",
    "bind": "127.0.0.1:2342",
    "cityDBPath": "/opt/geoip/GeoLite2-City.mmdb",
    "flowController": {
      "attackLimit": {
        "blockDuration": 600,
        "burstCount": 10,
        "enabled": true,
        "paramsCapacity": 10000,
        "statDuration": 60,
        "threshold": 100
      },
      "errorLimit": {
        "blockDuration": 600,
        "burstCount": 10,
        "enabled": true,
        "paramsCapacity": 10000,
        "statDuration": 60,
        "threshold": 100
      },
      "visitLimit": {
        "blockDuration": 600,
        "burstCount": 10,
        "enabled": true,
        "paramsCapacity": 10000,
        "statDuration": 60,
        "threshold": 100
      }
    },
    "useBuiltinRules": true
  },
  "haproxy": {
    "backupsNumber": 5,
    "configBaseDir": "/RuiQi",
    "haproxyBin": "haproxy",
    "spoeAgentAddr": "127.0.0.1",
    "spoeAgentPort": 2342,
    "thread": 4
  },
  "name": "AppConfig"
}

Response

配置更新成功

codeinteger
messagestring
requestIdstring
successboolean
timestampstring

Example response

{
  "code": 200,
  "data": {
    "engine": {
      "appConfig": [
        {
          "transactionTTL": 60000
        }
      ]
    }
  },
  "message": "操作成功",
  "requestId": "550e8400-e29b-41d4-a716-446655440000",
  "success": true,
  "timestamp": "2023-01-01T12:00:00Z"
}