跳转至

高级配置接口

POST 更新高级配置

POST /prod-api/cdn/layer7/advance/modifyAdvanceRules

Body 请求参数

新增规则(请求体中不写 locationId):

{
    "domainId": "215",
    "type": "1",
    "name": "*",
    "whiteBlacklist": [
        "1.1.1.1"
    ],
    "listClass": "1",
    "detectionRobot": "off"
}

编辑规则(需带上 locationId):

{
    "domainId": "215",
    "type": "1",
    "name": "*",
    "whiteBlacklist": [
        "1.1.1.1"
    ],
    "listClass": "1",
    "detectionRobot": "off",
    "locationId": 2676
}

填写说明

场景 locationId
新增规则 请求体中不写该参数
编辑规则 必填,取 查询目录高级配置 返回的 data.row[].locationId

请求参数

名称 位置 类型 必选 中文名 说明
Authorization header string -
body body L7AdvanceRuleVO L7AdvanceRuleVO -

返回示例

{
    "msg": "更新成功",
    "code": 200
}
{
    "msg": "提交成功",
    "code": 200
}

201 Response

{}

返回结果

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

返回数据结构

状态码 200

名称 类型 必选 约束 中文名 说明
» msg string true - -
» code integer true - -

数据模型

L7AdvanceRuleVO

{
  "detectionRobot": "string",
  "domainId": 0,
  "limitConn": "string",
  "listClass": 0,
  "name": "string",
  "type": 0,
  "whiteBlacklist": [
    "string"
  ]
}

编辑时在上述基础上增加 locationId

L7AdvanceRuleVO

属性

名称 类型 必选 约束 中文名 说明
detectionRobot string true - 人机识别 取值有:
on:表示启用;
off:表示未启用。
domainId integer(int64) true - 域名id -
limitConn string false - 频率限速 -
listClass integer(int32) true - 名单类型 取值有:
1:表示白名单;
2:表示黑名单。
locationId integer(int64) - 规则 ID 高级配置规则的唯一标识。新增时请求体中不写该参数;编辑时必填,与查询接口 data.row[].locationId 一致
name string true - 规则内容 -
type integer(int32) true - 规则类型 取值有:
1:表示全部;
3:表示文件夹;
4:表示全路径;
5:表示首页。
whiteBlacklist [string] false - 输入IP名单 -