基础防护模板 开关
更新时间:2026-03-10
POST
https://api.example.com/v1/waf/webTemplate/switch
基础防护模板 开关
请求参数
Headers 参数
除公共头域外,无其它特殊头域
Body 参数
templateKey
string
模板标识
必选
switch
integer
开关状态:0 => 关、1=>开
必选
请求结构
{
"templateKey": "模板标识,例如:template_001",
"switch": 1
}
示例代码
开启基础防护模板的请求示例
curl -X POST "https://api.example.com/v1/waf/webTemplate/switch" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"templateKey": "template_001",
"switch": 1
}'
{
"templateKey": "template_001",
"switch": 1
}
返回响应
Headers 参数
除公共头域外,无其它特殊头域
返回参数
success
boolean
请求是否成功
必选
status
integer
状态码
必选
成功执行开关操作后的返回结果
成功响应示例
{
"success": true,
"status": 200
}
