List requests Cloudflare stopped on a site
/v1/sites/{siteId}/protection/events Lists the requests Cloudflare blocked or challenged on the site's protected domains over the last 24 hours, newest first (up to 200), with what stopped each one. Empty while protection is off.
They're read from Cloudflare (kept 30 seconds); when its log can't be read just now it answers 502 bad_gateway: try again in a minute.
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
| Field | Type and description |
|---|---|
siteId Required | string The site's id. |
Query parameters
| Field | Type and description |
|---|---|
limit | integer 1 to 100 Default How many items to return, from 1 to 100. Default 25. |
cursor | string 1 to 1,024 characters The |
sort | string Default The field to sort by. Each list names the fields it can be sorted by. One of: |
order | string Default
One of: |
Example request
curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/protection/events" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/protection/events", {
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
},
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data, pagination } = await res.json();
console.log(data, pagination.nextCursor); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
for await (const item of rf.sites.protection.events.list({
siteId: "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
})) {
console.log(item);
} <?php
$ch = curl_init('https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/protection/events');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
$answer = json_decode($body, true);
print_r($answer['data']);
echo $answer['pagination']['nextCursor'] ?? 'Last page', PHP_EOL; import os
import requests
response = requests.get(
"https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/protection/events",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
timeout=120,
)
response.raise_for_status()
answer = response.json()
print(answer["data"], answer["pagination"]["nextCursor"]) Response
200 OK Returns a list of ProtectionEvent objects in data, with a Pagination object in pagination.
The ProtectionEvent object's fields 11 fields
| Field | Type and description |
|---|---|
id | string The event's id in this list: the request's Ray ID. When one request was stopped more than once, each of its events adds what happened to it, like |
occurredAt | string An ISO 8601 time, in UTC When the request came. |
action | string What Cloudflare did: Known values: |
hostname | string The domain the request was for. |
method | string The request's HTTP method, like GET or POST. |
path | string The page asked for (up to 300 characters). |
ip | string The IP address the request came from. |
country | string or null The country the request came from, as a two-letter code like US. Null when not known. |
reason | string What stopped it, in words: for example |
userAgent | string or null The browser or tool the request said it came from (up to 300 characters). Null when it sent none. |
rayId | string or null Cloudflare's Ray ID of the request: the code a stopped visitor sees on Cloudflare's page. Null when not known. |
Example response
{
"data": [
{
"id": "8e3f2a1b4c5d6e7f",
"occurredAt": "2026-11-18T10:44:09.000Z",
"action": "managed_challenge",
"hostname": "shop.example.com",
"method": "POST",
"path": "/wp-login.php",
"ip": "198.51.100.77",
"country": "US",
"reason": "Managed rules",
"userAgent": "python-requests/2.32.3",
"rayId": "8e3f2a1b4c5d6e7f"
}
],
"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 code | When, and what to do |
|---|---|
400 invalid_ | A query parameter is unknown or has a wrong value ( Correct or remove the parameter named in |
400 invalid_ | 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_ | This product isn't open to the account. Contact support if you'd like it opened. |
404 not_ | 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_ | 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 |
502 bad_ | Something on our side didn't answer properly. Try again in a moment. |
Rate limit
Heavy requests: 20 a minute per token, 40 per account. More in Rate limits.
Added on .
Deprecated since November 28, 2026; it stops working on November 30, 2027. Cloudflare protection was removed from Rabbitflare on 28 November 2026: this operation answers `403 feature_unavailable` for every site, and goes in v2.