Skip to content

List the requests a site's firewall stopped

GET /v1/sites/{siteId}/firewall/events

Lists the latest requests the site's firewall blocked or flagged, newest first: up to 100 of each, with the address they came from, the page they asked for, the kind of attack and the rules they matched. Filter by blocked. Flagged requests are the ones Monitor mode let through.

They're read from the site's server (kept 20 seconds), so this can take a few seconds; when the server can't be reached it answers 502 server_unreachable. Up to 30 reads a minute per account.

Scopes

The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).

sites:read
View sites. See sites and their domains, CDN, firewall, malware protection, backups, staging, resources, SMTP and Media Offload. SMTP includes who each site's recent emails went to, their subjects, and the team's sign-in addresses.

Path parameters

FieldType and description
siteId Required

string

The site's id.

Query parameters

FieldType and description
limit

integer 1 to 100 Default 25

How many items to return, from 1 to 100. Default 25.

cursor

string 1 to 1,024 characters

The nextCursor of the previous page, exactly as it was given. Leave it out for the first page.

sort

string Default occurredAt

The field to sort by. Each list names the fields it can be sorted by.

One of: occurredAt

order

string Default desc

asc (smallest or oldest first) or desc. Each list has its own default.

One of: ascdesc

blocked

string

true: only blocked requests. false: only flagged ones.

One of: truefalse

Example request

curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/firewall/events?blocked=true" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN"

Response

200 OK Returns a list of FirewallEvent objects in data, with a Pagination object in pagination.

The FirewallEvent object's fields 14 fields
FieldType and description
id

string

The event's id.

occurredAt

string or null An ISO 8601 time, in UTC

When the request came. Null when not known.

ip

string

The IP address the request came from.

method

string

The request's HTTP method, like GET or POST.

path

string

The page asked for, without its query string.

hasQuery

boolean

Whether the address had a query string (left out of path).

blocked

boolean

Whether the firewall blocked it. False: it was flagged and logged, but let through (in Monitor mode, for example).

httpStatus

integer

The HTTP status the site answered (403 when blocked).

score

integer or null

How suspicious the request looked: the total weight of the rules it matched. Null when not known.

userAgent

string or null

The browser or tool the request said it came from. Null when it sent none.

category

string

What kind of attack it looked like, in words: for example SQL injection, Cross-site scripting (XSS) or Suspicious request.

matchedRules

array of objects

The firewall rules the request matched.

ruleId

integer

The rule's number: an exception (POST /sites/{siteId}/firewall/exceptions) can turn it off for a false alarm.

message

string

What the rule found.

Example response

200 OK
{
  "data": [
    {
      "id": "aZq3Lk2mVt9Xw4Rn7Pb1",
      "occurredAt": "2026-11-18T10:02:44.000Z",
      "ip": "198.51.100.23",
      "method": "GET",
      "path": "/shop/",
      "hasQuery": true,
      "blocked": true,
      "httpStatus": 403,
      "score": 10,
      "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
      "category": "SQL injection",
      "matchedRules": [
        {
          "ruleId": 942270,
          "message": "Looking for basic SQL injection. Common attack string for MySQL, Oracle and others"
        },
        {
          "ruleId": 949110,
          "message": "Inbound Anomaly Score Exceeded (Total Score: 10)"
        }
      ]
    }
  ],
  "pagination": {
    "limit": 25,
    "hasMore": false,
    "nextCursor": null
  }
}

Errors

The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).

Status and codeWhen, and what to do
400 invalid_parameter

A query parameter is unknown or has a wrong value (fields names it), or the query is too long: over 16,384 characters, or a parameter's name over 64.

Correct or remove the parameter named in fields.

400 invalid_cursor

The cursor isn't one this list gave, or was made with other filters or another sort.

Start again from the first page, or keep the filters and sort the cursor was made with.

403 feature_unavailable

This product isn't open to the account.

Contact support if you'd like it opened.

404 not_found

The resource doesn't exist, or isn't this account's.

Check the id. Ids of other accounts' resources answer the same way.

409 server_restoring

The server is being restored, and nothing else can change it or its sites until that's done.

Wait until the restore finishes (the server's pendingAction is null again), then try again. A restore that stopped partway keeps pendingAction: "restore", with the server's lastError set, until our team has checked the server.

502 server_unreachable

The server didn't answer, or didn't finish the request.

Check that the server is running, then try again in a minute.

Rate limit

Heavy requests: 20 a minute per token, 40 per account. More in Rate limits.

Added on .

Popular

API docs