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
accountIdstringrequiredThe hosting account ID (
acct_…).Example
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.
{ "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
bytesobjectDisk space used against the disk quota.
usedBytesnumber or nullBytes used.
null when the server gave no usable reading.limitBytesnumber or nullDisk quota in bytes.
null when there is no limit or it is not known (see limitKind).usedGbnumber or nullSpace used in GB (1024³ bytes), three decimals.
null when usedBytes is null.limitGbnumber or nullDisk quota in GB (1024³ bytes), three decimals.
null when limitBytes is null.limitKindstringlimited: a fixed quota. unlimited: no quota. unknown: the server reported no quota value. One of limited, unlimited, unknown.usagePercentnumber or nullShare of the quota used, 0–100.
null without a known quota or usage.exceededbooleantrue when the space used is above the quota.inodesobject | nullFiles and folders against the inode limit.
null when the server reported neither count nor limit.usedintegerFiles and folders on the account.
limitinteger or nullInode limit.
null when there is no limit or it is not known.limitKindstringlimited: a fixed limit. unlimited: no limit. unknown: the server reported no limit value. One of limited, unlimited, unknown.remaininginteger or nullInodes left before the limit.
null without a known limit.usagePercentnumber or nullShare of the inode limit used, 0–100.
null without a known limit.exceededbooleantrue when the count is above the limit.underQuotabooleanfalse 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.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | The API key lacks a required scope or the hosting account is not active. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 409 | Conflict. code is account_suspended. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |