Read Firewall Configuration
GET
/__remote/api.vercel.com/v1/security/firewall/config/{configVersion}Retrieve the specified firewall configuration for a project. The deployed configVersion will be
active/__remote/api.vercel.com/v1/security/firewall/config/{configVersion}
const response = await fetch('/__remote/api.vercel.com/v1/security/firewall/config/configVersion?projectId=string&teamId=string&slug=string', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);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"}AuthorizationbearerToken
Default authentication mechanism
200If the firewall configuration includes a [custom managed ruleset](/docs/security/vercel-waf/managed-rulesets), it will include a `crs` item that has the following values: sd: Scanner Detection ma: Multipart Attack lfi: Local File Inclusion Attack rfi: Remote File Inclusion Attack rce: Remote Execution Attack php: PHP Attack gen: Generic Attack xss: XSS Attack sqli: SQL Injection Attack sf: Session Fixation Attack java: Java Attack
400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error