Read Firewall Configuration
GET
https://api.vercel.com/v1/security/firewall/config/{configVersion}Retrieve the specified firewall configuration for a project. The deployed configVersion will be
activeRequest
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.security.getFirewallConfig({ projectId: "<id>", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", configVersion: "<value>", });
console.log(result);}
run();Response
{ "ownerId": "example_id", "projectKey": "string", "id": "icfg_1234567890", "version": "123", "updatedAt": "string", "firewallEnabled": "false", "crs": { "sd": { "active": "false", "action": "deny" }, "ma": { "active": "false", "action": "deny" }, "lfi": { "active": "false", "action": "deny" }, "rfi": { "active": "false", "action": "deny" }, "rce": { "active": "false", "action": "deny" }, "php": { "active": "false", "action": "deny" }, "gen": { "active": "false", "action": "deny" }, "xss": { "active": "false", "action": "deny" }, "sqli": { "active": "false", "action": "deny" }, "sf": { "active": "false", "action": "deny" }, "java": { "active": "false", "action": "deny" } }, "rules": [ { "id": "icfg_1234567890", "name": "Example Name", "description": "string", "active": "false", "conditionGroup": [ { "conditions": [ { "type": "bot_category", "op": "eq", "neg": "false", "key": "string", "value": "string" } ] } ], "action": { "mitigate": { "action": "allow", "rateLimit": { "algo": "fixed_window", "window": "123", "limit": "123", "keys": [], "action": "challenge" }, "redirect": { "location": "string", "permanent": "false" }, "actionDuration": "string", "bypassSystem": "false", "logHeaders": [] } }, "valid": "true", "validationErrors": "value" } ], "ips": [ { "id": "icfg_1234567890", "hostname": "Example Name", "ip": "string", "notes": "string", "action": "bypass" } ], "rulesets": [ { "description": "string", "id": "icfg_1234567890", "name": "Example Name", "active": "false", "conditionGroup": [ { "conditions": [ { "type": "bot_category", "op": "eq", "neg": "false", "key": "string", "value": "string" } ] } ], "action": { "mitigate": { "action": "allow", "rateLimit": { "algo": "fixed_window", "window": "123", "limit": "123", "keys": [], "action": "challenge" }, "redirect": { "location": "string", "permanent": "false" }, "actionDuration": "string", "bypassSystem": "false", "logHeaders": [] } } } ], "conditions": [ { "description": "string", "id": "icfg_1234567890", "name": "Example Name", "active": "false", "conditionGroup": [ { "conditions": [ { "type": "bot_category", "op": "eq", "neg": "false", "key": "string", "value": "string" } ] } ] } ], "changes": [ "value" ], "managedRules": { "bot_protection": { "active": "false", "action": "challenge", "updatedAt": "string", "userId": "example_id", "username": "string" }, "ai_bots": { "active": "false", "action": "challenge", "updatedAt": "string", "userId": "example_id", "username": "string" }, "owasp": { "active": "false", "action": "challenge", "updatedAt": "string", "userId": "example_id", "username": "string" }, "vercel_ruleset": { "active": "false", "action": "challenge", "updatedAt": "string", "userId": "example_id", "username": "string" }, "traffic_sources": { "active": "false", "action": "challenge", "updatedAt": "string", "userId": "example_id", "username": "string" } }, "botIdEnabled": "false", "logHeaders": []}AuthorizationbearerToken
Default authentication mechanism
200If the firewall configuration includes a [custom managed ruleset](https://vercel.com/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