Get the attacks stopped on a server
/v1/servers/{serverId}/security/incidents Returns the attacks Imunify360 stopped (or only logged) on the server in the last 24 hours, newest first: web application firewall rules, attacks the WordPress plugin stopped inside a site, password guessing, denial of service, bots, port scans and addresses known for attacks. The server keeps at most 500. They aren't paged: an incident's id isn't kept from one look to the next, so look again for newer ones.
A site's own are also in GET /sites/{siteId}/malware-protection (incidents), for a token with sites:read.
The panel's own limit applies too: 120 looks a minute per person, shared with the panel (429 rate_limited).
Scopes
The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).
-
servers:read - View servers. See servers, their graphs, snapshots, logs and security (Imunify360).
Path parameters
| Field | Type and description |
|---|---|
serverId Required | string The server's id. |
Query parameters
| Field | Type and description |
|---|---|
siteId | string Only attacks on this site. |
kind | string Only this kind of attack. One of: |
severity | string Only this severity. One of: |
action | string Only what Imunify360 did this: One of: |
Example request
curl "https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/security/incidents?action=challenged" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/security/incidents?action=challenged", {
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
},
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data } = await res.json();
console.log(data); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
const data = await rf.servers.security.incidents.get({
serverId: "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
action: "challenged",
});
console.log(data); <?php
$ch = curl_init('https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/security/incidents?action=challenged');
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");
}
print_r(json_decode($body, true)['data']); import os
import requests
response = requests.get(
"https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/security/incidents",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
params={
"action": "challenged",
},
timeout=120,
)
response.raise_for_status()
print(response.json()["data"]) Response
200 OK Returns the ServerSecurityIncidents object in data.
The ServerSecurityIncidents object's fields 19 fields
| Field | Type and description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
incidents | array of objects The attacks of the last 24 hours (at most 500), newest first. Not paged: an incident's id isn't kept from one look to the next, so look again for a newer list. Empty while Imunify360 isn't on. | ||||||||||||
id | string The incident's id. | ||||||||||||
occurredAt | string An ISO 8601 time, in UTC When it happened (the last time, when it happened more than once). | ||||||||||||
ip | string or null The address it came from. Null when not known. | ||||||||||||
country | string or null Where that address is, as a two-letter country code. Null when not known. | ||||||||||||
siteId | string or null The site attacked. Null when it was the server, or the site isn't known. | ||||||||||||
domain | string or null The domain attacked. Null when it was the server. | ||||||||||||
kind | string
Known values: | ||||||||||||
description | string What it was. | ||||||||||||
ruleId | string or null The rule that matched, when it can be turned off for false alarms ( | ||||||||||||
severity | string
Known values: | ||||||||||||
action | string What Imunify360 did: Known values: | ||||||||||||
times | integer How many times it happened. | ||||||||||||
wordpress | object or null With Show its 5 fields
|
Example response
{
"data": {
"incidents": [
{
"id": "1",
"occurredAt": "2026-11-25T09:10:02.000Z",
"ip": "45.146.165.10",
"country": "DE",
"siteId": "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"domain": "shop.example.com",
"kind": "waf",
"description": "Information disclosure attempt via WordPress plugins",
"ruleId": "77350218",
"severity": "high",
"action": "challenged",
"times": 12,
"wordpress": 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 |
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 |