Check PHP security updates now
/v1/servers/{serverId}/actions/check-php-security Checks now whether the server has every PHP security fix installed and running, and answers the result (the server's phpSecurity shows it too). Servers are checked every few hours anyway; a check made moments ago isn't repeated. It only reads the server, which must be running.
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).
Headers
| Field | Type and description |
|---|---|
Idempotency-Key | string 1 to 255 characters A key of your own for this request, like a UUID: letters, digits and |
Path parameters
| Field | Type and description |
|---|---|
serverId Required | string The server's id. |
Example request
curl -X POST "https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/actions/check-php-security" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/actions/check-php-security", {
method: "POST",
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.checkPhpSecurity({
serverId: "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
});
console.log(data); <?php
$ch = curl_init('https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/actions/check-php-security');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
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.post(
"https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/actions/check-php-security",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
timeout=120,
)
response.raise_for_status()
print(response.json()["data"]) Response
200 OK Returns the PhpSecurity object in data.
The PhpSecurity object's fields 14 fields
| Field | Type and description |
|---|---|
state | string
Known values: |
reason | string or null Why the state is Known values: |
build | string or null The installed PHP build, like 8.3.6-0ubuntu0.24.04.13. Null until the first check. |
packages | integer How many PHP packages are installed (PHP itself and its extensions). |
fixes | array of objects Security fixes released for PHP that aren't installed yet. |
name | string The package. |
installed | string The version installed now. |
fixed | string The version with the fix. |
restart | array of strings Who still runs the build from before an update: the server's PHP, or a site's address. |
auto | boolean Whether security fixes install themselves every day. |
listsAt | string or null An ISO 8601 time, in UTC When the server last downloaded the lists of updates. Null when it never has. |
securityAt | string or null An ISO 8601 time, in UTC When the list of security updates the server has was published. Null when it has none. |
checkedAt | string or null An ISO 8601 time, in UTC When the server was last checked. Null until the first check. |
error | string or null Why the latest check failed, when it failed after the last good one. Null otherwise. |
Example response
{
"data": {
"state": "current",
"reason": null,
"build": "8.3.6-0ubuntu0.24.04.13",
"packages": 14,
"fixes": [],
"restart": [],
"auto": true,
"listsAt": "2026-11-18T06:12:04.000Z",
"securityAt": "2026-11-17T21:30:00.000Z",
"checkedAt": "2026-11-18T07:00:31.000Z",
"error": 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 |
|---|---|
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 invalid_ | The resource's status doesn't allow this now (for example, powering on a server that is running). Check the resource's |
409 busy | Another change is still in progress on this server or site, or something else under way stops this one for now (a site backup running on the server, the server's backups being moved): Wait until it finishes, then try again. A change to the server or site itself is done when its |
409 installing_ | Updates are being installed on the server right now. Check again in a few minutes. |
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 |