Skip to content

Get a server's logs and clean-up settings

GET /v1/servers/{serverId}/logs

How much room the server's logs take (the system's own logs by group, and each site's) and how they're cleaned up. The sizes are read from the server while it's running, which can take a few seconds; otherwise usage is null and usageError says why.

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

FieldType and description
serverId Required

string

The server's id.

Example request

curl "https://api.rabbitflare.com/v1/servers/3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d/logs" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN"

Response

200 OK Returns the ServerLogs object in data.

The ServerLogs object's fields 34 fields
FieldType and description
settings

object

How the server cleans up its logs.

autoClean

boolean

Whether old logs are cleaned up automatically, every hour.

keepDays

integer

How many days old copies of logs are kept: 1, 3, 7, 14, 30, 90.

maxSizeMb

integer

The size, in MB, a log may reach before it's rotated: 10, 50, 100, 250, 500, 1000.

freeSpace

boolean

Whether space is freed up from logs when the disk is over 90% full.

state

string

applied: the server uses these settings. applying: they're being put in place. failed: they couldn't be (see error).

Known values: appliedapplyingfailed More can appear.

error

string or null

Why the settings couldn't be put in place. Null otherwise.

usage

object or null

How much room the logs take, read from the server. Null while the server isn't running or didn't answer (see usageError).

disk

object

The server's disk.

Show its 4 fields
FieldType and description
totalBytes

integer

The disk's size.

usedBytes

integer

Space in use.

freeBytes

integer

Space free.

usedPercent

number

Space in use, in percent.

logsBytes

integer

Space all logs take.

groups

array of objects

The system's own logs, by group.

Show its 6 fields
FieldType and description
id

string

The group: web, firewall, system, database or other.

Known values: webfirewallsystemdatabaseother More can appear.

title

string

The group's name, as the panel shows it.

bytes

integer

Space the group's logs take.

currentBytes

integer

The logs being written now.

oldBytes

integer

Old copies of them.

journalBytes

integer or null

The system journal's share (the system group only). Null for other groups.

sites

array of objects

Each site's logs.

Show its 7 fields
FieldType and description
siteId

string or null

The site's id. Null when the logs belong to a site that no longer exists.

name

string

The site's name.

stagingCopy

boolean

A staging copy of another site.

bytes

integer

Space the site's logs take.

phpBytes

integer

Its PHP error log.

debugBytes

integer

Its WordPress debug log.

oldBytes

integer

Old copies of its logs.

lastAutoClean

object or null

The last automatic clean-up. Null when there hasn't been one.

Show its 2 fields
FieldType and description
ranAt

string An ISO 8601 time, in UTC

When it ran.

freedBytes

integer

Space it freed.

autoCleanOn

boolean

Whether the server's hourly clean-up is set up and on right now.

usageError

string or null

Why usage couldn't be read. Null when it was.

Example response

200 OK
{
  "data": {
    "settings": {
      "autoClean": true,
      "keepDays": 7,
      "maxSizeMb": 100,
      "freeSpace": true,
      "state": "applied",
      "error": null
    },
    "usage": {
      "disk": {
        "totalBytes": 85899345920,
        "usedBytes": 18253611008,
        "freeBytes": 67645734912,
        "usedPercent": 21.3
      },
      "logsBytes": 412090368,
      "groups": [
        {
          "id": "web",
          "title": "Web server",
          "bytes": 201326592,
          "currentBytes": 12582912,
          "oldBytes": 188743680,
          "journalBytes": null
        }
      ],
      "sites": [
        {
          "siteId": "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
          "name": "Shop",
          "stagingCopy": false,
          "bytes": 52428800,
          "phpBytes": 1048576,
          "debugBytes": 50331648,
          "oldBytes": 1048576
        }
      ],
      "lastAutoClean": {
        "ranAt": "2026-11-18T08:00:03.000Z",
        "freedBytes": 10485760
      },
      "autoCleanOn": true
    },
    "usageError": 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
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.

Rate limit

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

Added on .

Popular

API docs