Read Firewall Actions by Project
GET
https://api.vercel.com/v1/security/firewall/eventsRetrieve firewall actions for a project Rule names are resolved against the project's current active firewall configuration and the team's active rulesets, so a rule that has since been renamed reports its new name and one that has been deleted reports
null. System rules such as sys_dos_mitigation and ip_blocking have no configured name and always report null. Filters (ip, isActive, action, actionType, ruleKind, ruleId, hosts) are ANDed across params and ORed within a repeated param. They are applied to the policies before limit/cursor, so pages only count matching policies. A policy with no matching requests yields no action row, so a page can hold fewer than limit actions; only pagination.next signals the end. A cursor is only valid with the filters it was issued for.https://api.vercel.com/v1/security/firewall/events
const response = await fetch('https://api.vercel.com/v1/security/firewall/events?sort=string&limit=123&cursor=string&projectId=string&startTimestamp=123&endTimestamp=123&hosts=string&ip=[]&isActive=true&action=[]&actionType=[]&ruleKind=string&ruleId=[]&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
{ "actions": [ { "action": "string", "action_type": "string", "count": "123", "endTime": "string", "host": "string", "isActive": "false", "public_ip": "string", "ruleId": "example_id", "ruleName": "Example Name", "startTime": "string" } ], "pagination": { "hasMore": "false", "next": "string" }}AuthorizationbearerToken
Default authentication mechanism