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.Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.security.getSecurityFirewallEvents({ projectId: "<id>", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", });
console.log(result);}
run();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