List a site's malware threats
/v1/sites/{siteId}/malware-protection/threats Lists the malware and other threats found on the site: open ones to clean or ignore, and those cleaned or ignored (kept while the server keeps them, at most 1000 a server). Empty while Imunify360 isn't on.
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).
-
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: |
status | string Only threats in this state. One of: |
severity | string Only this severity. One of: |
kind | string Only in files, or only in the database. One of: |
Example request
curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/malware-protection/threats?status=open" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/malware-protection/threats?status=open", {
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.malwareProtection.threats.list({
siteId: "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
status: "open",
})) {
console.log(item);
} <?php
$ch = curl_init('https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/malware-protection/threats?status=open');
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/malware-protection/threats",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
params={
"status": "open",
},
timeout=120,
)
response.raise_for_status()
answer = response.json()
print(answer["data"], answer["pagination"]["nextCursor"]) Response
200 OK Returns a list of MalwareThreat objects in data, with a Pagination object in pagination.
The MalwareThreat object's fields 11 fields
| Field | Type and description |
|---|---|
id | string The threat's id (digits): what the clean, undo and ignore actions take in |
kind | string
Known values: |
location | string or null The file, relative to the site's folder. Null for a threat in the database, or a file outside the site's folder. |
threat | string What it is, in words. |
signature | string The malware signature that matched, as Imunify360 names it. |
severity | string
Known values: |
foundBy | string
Known values: |
foundAt | string or null An ISO 8601 time, in UTC When it was found. Null when not known. |
status | string
Known values: |
doneAt | string or null An ISO 8601 time, in UTC When it was cleaned. Null otherwise. |
canUndo | boolean Whether the clean-up can be undone (a copy of the file is kept |
Example response
{
"data": [
{
"id": "1",
"kind": "file",
"location": "wp-content/uploads/cache.php",
"threat": "Web shell (a backdoor that lets attackers run commands)",
"signature": "SMW-SA-20634-php.bkdr.wshll-0",
"severity": "critical",
"foundBy": "realtime",
"foundAt": "2026-11-25T08:14:02.000Z",
"status": "open",
"doneAt": null,
"canUndo": false
}
],
"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 |