Skip to content

Get a site's resources

GET /v1/sites/{siteId}/resources

Returns how much of its server the site may use: its CPU, memory and process limits, its CPU priority and its PHP settings (settings), whether they're in place on the server (status), what the server has (server), and the server's other sites with limits of their own (otherSites). blockedReason says when the site can't have settings of its own.

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" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN"

Response

200 OK Returns the SiteResources object in data.

The SiteResources object's fields 28 fields
FieldType and description
status

string

Whether the settings are in place on the site's server: applied, applying (on their way, usually within a minute) or failed (see lastError: the site keeps its previous settings).

Known values: appliedapplyingfailed More can appear.

lastError

string or null

Why the settings couldn't be put in place (with status: "failed"). Null otherwise.

blockedReason

string or null

Why the site can't have settings of its own right now: a staging copy (set them on the live site), a site on its server's original one-site setup, a site still installing, or a stopped server. Null when it can.

settings

object

The site's settings. A CPU, memory or process limit, or a priority other than normal, gives the site a PHP of its own; the PHP settings apply either way.

cpuPercent

integer or null

The share of the server's processor the site may use, in percent of all its cores. Null: no limit of its own.

memoryMb

integer or null

The memory the site may use (its PHP and scheduled tasks), in MB. Null: no limit of its own.

processes

integer or null

How many processes the site may run at once. Null: no limit of its own.

priority

string

The site's share of the processor when the server is busy: low, normal (the default) or high.

Known values: lownormalhigh More can appear.

workers

integer or null

How many PHP workers the site may run (requests served at once). Null: set by the server's memory (server.autoWorkers).

phpMemoryMb

integer or null

PHP's memory limit per request, in MB. Null: the server's (256 MB).

timeLimit

integer or null

How long one request may run, in seconds. Null: the server's (120 seconds).

uploadMb

integer or null

The largest upload, in MB. Null: the server's (64 MB).

inputVars

integer or null

The most form fields one request may send. Null: the server's (5,000).

server

object

What the site's server has, and what follows from it.

vcpus

integer

The server's vCPUs.

memoryMb

integer

The server's memory, in MB.

maxMemoryMb

integer

The largest memory limit a site on this server can have, in MB: the server's memory less what the system, database and web server need.

autoWorkers

integer

The PHP workers a site gets on this server when workers is null.

applied

object or null

How the site runs on its server, as the server last reported. Null before it first did.

mode

string

isolated: the site runs a PHP of its own, within its limits. shared: it runs on the server's shared PHP.

Known values: sharedisolated More can appear.

workers

integer

How many PHP workers the site may run.

otherSites

array of objects

The server's other sites with limits or a priority of their own, by name.

siteId

string

The site's id.

name

string

The site's name.

cpuPercent

integer or null

Its CPU limit, in percent. Null: none.

memoryMb

integer or null

Its memory limit, in MB. Null: none.

processes

integer or null

Its process limit. Null: none.

priority

string

Its CPU priority: low, normal or high.

Known values: lownormalhigh More can appear.

Example response

200 OK
{
  "data": {
    "status": "applied",
    "lastError": null,
    "blockedReason": null,
    "settings": {
      "cpuPercent": 50,
      "memoryMb": 1024,
      "processes": null,
      "priority": "normal",
      "workers": 8,
      "phpMemoryMb": 512,
      "timeLimit": null,
      "uploadMb": 128,
      "inputVars": null
    },
    "server": {
      "vcpus": 2,
      "memoryMb": 4096,
      "maxMemoryMb": 3840,
      "autoWorkers": 24
    },
    "applied": {
      "mode": "isolated",
      "workers": 8
    },
    "otherSites": [
      {
        "siteId": "9b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
        "name": "Blog",
        "cpuPercent": 25,
        "memoryMb": null,
        "processes": null,
        "priority": "low"
      }
    ]
  }
}

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.

Rate limit

Read requests: 120 a minute per token, 240 per account. More in Rate limits.

Added on .

Popular

API docs