v1

latestSwagger 2.0Apache 2.02026-07-174372196.9 KB
规则管理

更新微规则

更新指定微规则的信息,系统默认规则不允许修改

put/api/v1/micro-rules/{id}

Path parameters

idstring required

微规则ID

Request body

conditionobject

规则条件

namestring

规则名称

priorityinteger

优先级字段,数字越大优先级越高

status'enabled' | 'disabled'

规则状态

type'whitelist' | 'blacklist'

规则类型

Example request

{
  "name": "SQL注入防护规则",
  "priority": 100,
  "status": "enabled",
  "type": "blacklist"
}

Response

微规则更新成功

codeinteger
messagestring
requestIdstring
successboolean
timestampstring

Example response

{
  "code": 200,
  "data": {
    "id": "60a763d0f03239868b50e810",
    "name": "SQL注入防护规则",
    "priority": 100,
    "status": "enabled",
    "type": "blacklist"
  },
  "message": "操作成功",
  "requestId": "550e8400-e29b-41d4-a716-446655440000",
  "success": true,
  "timestamp": "2023-01-01T12:00:00Z"
}