跳转至

自定义规则

POST 获取自定义控制规则 nlaV1:acl:query

POST /prod-api/waf/nlaV1/custom/rules/describeCustomRules

Body 请求参数

{
  "pageNum": 1,
  "pageSize": 20,
  "aclId": 74,
  "params": {}
}

请求参数

名称 位置 类型 必选 中文名 说明
Authorization header string -
body body object -
» aclId body integer(int64) 规则id -
» pageNum body integer(int32) 当前页数 -
» pageSize body integer(int32) 每页显示条目个数 -

返回示例

200 Response

{
  "total": 7,
  "rows": [
    {
      "customRuleId": 128,
      "ruleMessage": "鉴权",
      "status": "enable",
      "targets": [
        {
          "name": "主机名",
          "value": "HOST"
        },
        {
          "name": "Uri请求",
          "value": "REQUEST_URI"
        }
      ],
      "ruleClass": "custom",
      "action": "鉴权",
      "updateTime": "2026-05-14 14:47:05",
      "sort": 1
    },
    {
      "customRuleId": 122,
      "ruleMessage": "人机",
      "status": "enable",
      "targets": [
        {
          "name": "Uri请求",
          "value": "REQUEST_URI"
        }
      ],
      "ruleClass": "custom",
      "action": "人机验证",
      "updateTime": "2026-03-02 13:54:12",
      "sort": 2
    },
    {
      "customRuleId": 126,
      "ruleMessage": "112",
      "status": "enable",
      "targets": [
        {
          "name": "路径",
          "value": "URI"
        }
      ],
      "ruleClass": "custom",
      "action": "鉴权",
      "updateTime": "2026-04-14 15:31:18",
      "sort": 3
    },
    {
      "customRuleId": 125,
      "ruleMessage": "11",
      "status": "enable",
      "targets": [
        {
          "name": "IP",
          "value": "IP_SRC"
        }
      ],
      "ruleClass": "custom",
      "action": "拦截",
      "updateTime": "2026-03-12 14:32:01",
      "sort": 4
    },
    {
      "customRuleId": 124,
      "ruleMessage": "ipce",
      "status": "enable",
      "targets": [
        {
          "name": "IP",
          "value": "IP_SRC"
        }
      ],
      "ruleClass": "custom",
      "action": "拦截",
      "updateTime": "2026-03-12 14:11:22",
      "sort": 6
    },
    {
      "customRuleId": 123,
      "ruleMessage": "ip拦截",
      "status": "enable",
      "targets": [
        {
          "name": "IP",
          "value": "IP_SRC"
        }
      ],
      "ruleClass": "custom",
      "action": "拦截",
      "updateTime": "2026-03-12 11:40:28",
      "sort": 7
    },
    {
      "customRuleId": 127,
      "ruleMessage": "111",
      "status": "enable",
      "targets": [
        {
          "name": "IP",
          "value": "IP_SRC"
        }
      ],
      "ruleClass": "custom",
      "action": "拦截",
      "updateTime": "2026-03-12 14:31:48",
      "sort": 30
    }
  ],
  "code": 200,
  "msg": "成功"
}

返回结果

状态码 状态码含义 说明 数据模型
200 OK OK Inline
201 Created Created -
401 Unauthorized Unauthorized -
403 Forbidden Forbidden -
404 Not Found Not Found -

返回数据结构

状态码 200

名称 类型 必选 约束 中文名 说明
» total integer true - 总数 -
» rows [object] true - 数据列表 -
»» customRuleId integer true - 规则id -
»» ruleMessage string true - 规则名称 -
»» status string true - 是否启用 enable:表示开
disable:表示关
»» targets [object] true - 条件 -
»»» name string true - 名称 -
»»» value string true - -
»» ruleClass string true - -
»» action string true - 操作方式 -
»» updateTime string true - 更新时间 -
»» sort integer true - 排序 -
» code integer true - -
» msg string true - -

数据模型

DescribeNlaCustomRulesReqVO

{
  "aclId": 0,
  "country": "string",
  "filters": [
    {
      "label": "string",
      "value": ["string"]
    }
  ],
  "pageNum": 0,
  "pageSize": 0,
  "params": {},
  "searchHeader": {},
  "searchValue": "string",
  "tableCul": {
    "property1": "string",
    "property2": "string"
  },
  "userId": 0
}

DescribeNlaCustomRulesReqVO

属性

名称 类型 必选 约束 中文名 说明
aclId integer(int64) true - 规则id -

| filters | [SearchFilterVo] | false | - | | - | | pageNum | integer(int32) | true | - | 当前页数 | - | | pageSize | integer(int32) | true | - | 每页显示条目个数 | - | | params | object | false | - | | - | | searchHeader | object | false | - | | - |

SearchFilterVo

{
  "label": "string",
  "value": ["string"]
}

SearchFilterVo

属性

名称 类型 必选 约束 中文名 说明
label string false - -
value [string] false - -