Skip to content

Get what a site uses of its server now

GET /v1/sites/{siteId}/resources/usage

Measures what the site uses of its server right now, over one second: processor, memory and processes (its PHP and scheduled tasks; database work is shared by all sites and isn't counted). It's read from the site's server, so it takes a second or two; a reading is kept 4 seconds. Live sites with the standard setup only (409 site_unavailable otherwise).

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

FieldType and description
siteId Required

string

The site's id.

Example request

curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/resources/usage" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN"

Response

200 OK Returns the SiteUsage object in data.

The SiteUsage object's fields 5 fields
FieldType and description
mode

string

isolated: the site runs a PHP of its own, counted exactly. shared: it runs on the server's shared PHP, counted by the site's own processes.

Known values: sharedisolated More can appear.

cpuPercent

number

The processor the site used over the last second, in percent of the whole server.

memoryMb

integer

The memory the site uses now, in MB.

processes

integer

How many processes the site runs now (its PHP and scheduled tasks).

measuredAt

string An ISO 8601 time, in UTC

When it was measured.

Example response

200 OK
{
  "data": {
    "mode": "isolated",
    "cpuPercent": 12.5,
    "memoryMb": 386,
    "processes": 9,
    "measuredAt": "2026-11-19T10:02:44.000Z"
  }
}

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 site_unavailable

The site isn't in a state that allows this (for example, it's still installing).

Wait until the site is active, then try again.

409 server_unavailable

The server isn't in a state that allows this (for example, it's off or still being set up).

Start the server, or wait until it's active, then try again.

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.

429 rate_limited

Too many requests. scope says which limit: token, account, create, operation or network.

Wait for Retry-After seconds, then go on more slowly.

502 server_unreachable

The server didn't answer, or didn't finish the request.

Check that the server is running, then try again in a minute.

Rate limit

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

Added on .

Popular

API docs