Skip to content
Docs

Returns activated WAF config

POSThttps://api.vercel.com/v1/security/firewall/config/{configVersion}/activate
Promotes a draft WAF config to an active config
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel();
async function run() {
const result = await vercel.security.createSecurityFirewallConfigByConfigVersionActivate({
configVersion: "<value>",
});
console.log(result);
}
run();
Response
{
"botIdEnabled": "false",
"changes": [
"value"
],
"conditions": [
{
"active": "false",
"conditionGroup": [
{
"conditions": [
{
"key": "string",
"neg": "false",
"op": "eq",
"type": "bot_category",
"value": "string"
}
]
}
],
"description": "string",
"id": "icfg_1234567890",
"name": "Example Name"
}
],
"crs": {
"gen": {
"action": "deny",
"active": "false"
},
"java": {
"action": "deny",
"active": "false"
},
"lfi": {
"action": "deny",
"active": "false"
},
"ma": {
"action": "deny",
"active": "false"
},
"php": {
"action": "deny",
"active": "false"
},
"rce": {
"action": "deny",
"active": "false"
},
"rfi": {
"action": "deny",
"active": "false"
},
"sd": {
"action": "deny",
"active": "false"
},
"sf": {
"action": "deny",
"active": "false"
},
"sqli": {
"action": "deny",
"active": "false"
},
"xss": {
"action": "deny",
"active": "false"
}
},
"firewallEnabled": "false",
"id": "icfg_1234567890",
"ips": [
{
"action": "bypass",
"hostname": "Example Name",
"id": "icfg_1234567890",
"ip": "string",
"notes": "string"
}
],
"logHeaders": [],
"managedRules": {
"ai_bots": {
"action": "challenge",
"active": "false",
"updatedAt": "string",
"userId": "example_id",
"username": "string"
},
"bot_protection": {
"action": "challenge",
"active": "false",
"updatedAt": "string",
"userId": "example_id",
"username": "string"
},
"owasp": {
"action": "challenge",
"active": "false",
"updatedAt": "string",
"userId": "example_id",
"username": "string"
},
"traffic_sources": {
"action": "challenge",
"active": "false",
"updatedAt": "string",
"userId": "example_id",
"username": "string"
},
"vercel_ruleset": {
"action": "challenge",
"active": "false",
"updatedAt": "string",
"userId": "example_id",
"username": "string"
}
},
"ownerId": "example_id",
"projectKey": "string",
"rules": [
{
"action": {
"mitigate": {
"action": "allow",
"actionDuration": "string",
"bypassSystem": "false",
"logHeaders": [],
"rateLimit": {
"action": "challenge",
"algo": "fixed_window",
"keys": [],
"limit": "123",
"window": "123"
},
"redirect": {
"location": "string",
"permanent": "false"
}
}
},
"active": "false",
"conditionGroup": [
{
"conditions": [
{
"key": "string",
"neg": "false",
"op": "eq",
"type": "bot_category",
"value": "string"
}
]
}
],
"description": "string",
"id": "icfg_1234567890",
"name": "Example Name",
"valid": "true",
"validationErrors": "value"
}
],
"rulesets": [
{
"active": "false",
"conditionGroup": [
{
"conditions": [
{
"key": "string",
"neg": "false",
"op": "eq",
"type": "bot_category",
"value": "string"
}
]
}
],
"description": "string",
"id": "icfg_1234567890",
"name": "Example Name",
"action": {
"mitigate": {
"action": "allow",
"actionDuration": "string",
"bypassSystem": "false",
"logHeaders": [],
"rateLimit": {
"action": "challenge",
"algo": "fixed_window",
"keys": [],
"limit": "123",
"window": "123"
},
"redirect": {
"location": "string",
"permanent": "false"
}
}
}
}
],
"updatedAt": "string",
"version": "123"
}
configVersionstringRequired
The deployed configVersion for the firewall configuration
200Success
botIdEnabledbooleanOptional
changesarrayRequired
conditionsarrayOptional
crsobjectOptional
firewallEnabledbooleanRequired
idstringRequired
ipsarrayRequired
logHeadersobjectOptional2 variants
managedRulesobjectOptional
ownerIdstringRequired
projectKeystringRequired
rulesarrayRequired
rulesetsobjectOptional2 variants
updatedAtstringRequired
versionnumberRequired
400Error
401The request is not authorized.
402Error
403You do not have permission to access this resource.
404Error
410Error
500Error