Skip to content

Get hosting disk quota

GET /api/v2/shared-hosting/{accountId}/disk-quota

Returns the disk space and the number of files (inodes) the web hosting account uses, with its limits. underQuota is false when the account is over its disk quota. A null usage means the server gave no usable reading. It never means zero. On an account on Hostup’s previous hosting platform the usage and limits are not known: limitKind is unknown and inodes is null.

Authentication: An API key with the scopes read:hosting and console:services. About keys and scopes

Request

Path parameters

accountIdstringrequired
The hosting account ID (acct_…).

Example

GET /api/v2/shared-hosting/{accountId}/disk-quota
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/disk-quota" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 Disk and inode usage of the account.

Response 200
{
"bytes": {
"usedBytes": 4294967296,
"limitBytes": 21474836480,
"usedGb": 4,
"limitGb": 20,
"limitKind": "limited",
"usagePercent": 20,
"exceeded": false
},
"inodes": {
"used": 12000,
"limit": 250000,
"limitKind": "limited",
"remaining": 238000,
"usagePercent": 4.8,
"exceeded": false
},
"underQuota": true
}
Response fields
bytesobject
Disk space used against the disk quota.
usedBytesnumber or null
Bytes used. null when the server gave no usable reading.
limitBytesnumber or null
Disk quota in bytes. null when there is no limit or it is not known (see limitKind).
usedGbnumber or null
Space used in GB (1024³ bytes), three decimals. null when usedBytes is null.
limitGbnumber or null
Disk quota in GB (1024³ bytes), three decimals. null when limitBytes is null.
limitKindstring
limited: a fixed quota. unlimited: no quota. unknown: the server reported no quota value. One of limited, unlimited, unknown.
usagePercentnumber or null
Share of the quota used, 0–100. null without a known quota or usage.
exceededboolean
true when the space used is above the quota.
inodesobject | null
Files and folders against the inode limit. null when the server reported neither count nor limit.
usedinteger
Files and folders on the account.
limitinteger or null
Inode limit. null when there is no limit or it is not known.
limitKindstring
limited: a fixed limit. unlimited: no limit. unknown: the server reported no limit value. One of limited, unlimited, unknown.
remaininginteger or null
Inodes left before the limit. null without a known limit.
usagePercentnumber or null
Share of the inode limit used, 0–100. null without a known limit.
exceededboolean
true when the count is above the limit.
underQuotaboolean
false when the account is over its disk quota.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403The API key lacks a required scope or the hosting account is not active.
404Not found. The resource does not exist or is not owned by the caller.
409Conflict. code is account_suspended.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.