Retrieve the specified firewall configuration for a project. The deployed configVersion will be active
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/security/firewall/config/configVersion?projectId=SOME_STRING_VALUE&slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Query Parameter | Description |
---|---|
projectId | string required |
slug | string The Team slug to perform the request on behalf of. |
teamId | string The Team identifier to perform the request on behalf of. |
changesarrayRequired crsobjectRequired firewallEnabledbooleanRequired idstringRequired ipsarrayRequired managedRulesobject ownerIdstringRequired projectKeystringRequired rulesarrayRequired updatedAtstringRequired versionnumberRequired
Code | Description |
---|---|
200 | If the firewall configuration includes a custom managed ruleset, 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 |
400 | One of the provided values in the request query is invalid. |
401 | |
403 | You do not have permission to access this resource. |
404 |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/security/firewall/config/configVersion?projectId=SOME_STRING_VALUE&slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Set the firewall configuration to provided rules and settings. Creates or overwrite the existing firewall configuration.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/security/firewall/config?projectId=SOME_STRING_VALUE&slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "body": {3 "firewallEnabled": true,4 "crs": {5 "sd": {6 "active": true,7 "action": "deny"8 },9 "ma": {10 "active": true,11 "action": "deny"12 },13 "lfi": {14 "active": true,15 "action": "deny"16 },17 "rfi": {18 "active": true,19 "action": "deny"20 },21 "rce": {22 "active": true,23 "action": "deny"24 },25 "php": {26 "active": true,27 "action": "deny"28 },29 "gen": {30 "active": true,31 "action": "deny"32 },33 "xss": {34 "active": true,35 "action": "deny"36 },37 "sqli": {38 "active": true,39 "action": "deny"40 },41 "sf": {42 "active": true,43 "action": "deny"44 },45 "java": {46 "active": true,47 "action": "deny"48 }49 },50 "ips": [51 {52 "id": "SOME_STRING_VALUE",53 "hostname": "SOME_STRING_VALUE",54 "ip": "SOME_STRING_VALUE",55 "notes": "SOME_STRING_VALUE",56 "action": "deny"57 }58 ],59 "managedRules": {60 "owasp": {61 "active": true62 }63 },64 "rules": [65 {66 "id": "SOME_STRING_VALUE",67 "name": "SOME_STRING_VALUE",68 "description": "SOME_STRING_VALUE",69 "active": true,70 "conditionGroup": [71 {72 "conditions": "SOME_ARRAY_VALUE"73 }74 ],75 "action": {76 "mitigate": {77 "action": "log",78 "rateLimit": "ANY_TYPE_VALUE",79 "redirect": "ANY_TYPE_VALUE",80 "actionDuration": "SOME_STRING_VALUE"81 }82 }83 }84 ]85 },86 "headers": {87 "Authorization": "Bearer <TOKEN>"88 },89 "method": "put"90})
Query Parameter | Description |
---|---|
projectId | string required |
slug | string The Team slug to perform the request on behalf of. |
teamId | string The Team identifier to perform the request on behalf of. |
activeobjectRequired
Code | Description |
---|---|
200 | |
400 |
|
401 | |
402 | |
403 | You do not have permission to access this resource. |
404 | |
500 |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/security/firewall/config?projectId=SOME_STRING_VALUE&slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "body": {3 "firewallEnabled": true,4 "crs": {5 "sd": {6 "active": true,7 "action": "deny"8 },9 "ma": {10 "active": true,11 "action": "deny"12 },13 "lfi": {14 "active": true,15 "action": "deny"16 },17 "rfi": {18 "active": true,19 "action": "deny"20 },21 "rce": {22 "active": true,23 "action": "deny"24 },25 "php": {26 "active": true,27 "action": "deny"28 },29 "gen": {30 "active": true,31 "action": "deny"32 },33 "xss": {34 "active": true,35 "action": "deny"36 },37 "sqli": {38 "active": true,39 "action": "deny"40 },41 "sf": {42 "active": true,43 "action": "deny"44 },45 "java": {46 "active": true,47 "action": "deny"48 }49 },50 "ips": [51 {52 "id": "SOME_STRING_VALUE",53 "hostname": "SOME_STRING_VALUE",54 "ip": "SOME_STRING_VALUE",55 "notes": "SOME_STRING_VALUE",56 "action": "deny"57 }58 ],59 "managedRules": {60 "owasp": {61 "active": true62 }63 },64 "rules": [65 {66 "id": "SOME_STRING_VALUE",67 "name": "SOME_STRING_VALUE",68 "description": "SOME_STRING_VALUE",69 "active": true,70 "conditionGroup": [71 {72 "conditions": "SOME_ARRAY_VALUE"73 }74 ],75 "action": {76 "mitigate": {77 "action": "log",78 "rateLimit": "ANY_TYPE_VALUE",79 "redirect": "ANY_TYPE_VALUE",80 "actionDuration": "SOME_STRING_VALUE"81 }82 }83 }84 ]85 },86 "headers": {87 "Authorization": "Bearer <TOKEN>"88 },89 "method": "put"90})
Update the setting for determining if the project has Attack Challenge mode enabled.
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/security/attack-mode?slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "body": {3 "attackModeEnabled": true,4 "projectId": "SOME_STRING_VALUE",5 "attackModeActiveUntil": "SOME_NUMBER_VALUE"6 },7 "headers": {8 "Authorization": "Bearer <TOKEN>"9 },10 "method": "post"11})
Query Parameter | Description |
---|---|
slug | string The Team slug to perform the request on behalf of. |
teamId | string The Team identifier to perform the request on behalf of. |
attackModeEnabledbooleanRequired attackModeUpdatedAtnumberRequired
Code | Description |
---|---|
200 | |
400 | One of the provided values in the request body is invalid. |
401 | |
403 | You do not have permission to access this resource. |
404 |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/security/attack-mode?slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "body": {3 "attackModeEnabled": true,4 "projectId": "SOME_STRING_VALUE",5 "attackModeActiveUntil": "SOME_NUMBER_VALUE"6 },7 "headers": {8 "Authorization": "Bearer <TOKEN>"9 },10 "method": "post"11})
Process updates to modify the existing firewall config for a project
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/security/firewall/config?projectId=SOME_STRING_VALUE&slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "body": {3 "action": "SOME_STRING_VALUE",4 "id": "SOME_NULL_VALUE",5 "value": true6 },7 "headers": {8 "Authorization": "Bearer <TOKEN>"9 },10 "method": "patch"11})
Query Parameter | Description |
---|---|
projectId | string required |
slug | string The Team slug to perform the request on behalf of. |
teamId | string The Team identifier to perform the request on behalf of. |
object
Code | Description |
---|---|
200 | |
400 |
|
401 | |
402 | |
403 | You do not have permission to access this resource. |
404 | |
500 |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/security/firewall/config?projectId=SOME_STRING_VALUE&slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "body": {3 "action": "SOME_STRING_VALUE",4 "id": "SOME_NULL_VALUE",5 "value": true6 },7 "headers": {8 "Authorization": "Bearer <TOKEN>"9 },10 "method": "patch"11})
Was this helpful?