Get Cloud VPS account limits
GET /api/v2/vps/payg/limits
Shows how much Cloud VPS capacity the account may use, how much it uses now and how much is left. The limits cover CPU cores, memory, disk, Cloud VPS count, floating IPs, snapshots, private networks and mail relay e-mails per month. To get a higher limit, send a request with POST /api/v2/vps/payg/limits/requests. Requests still waiting are in pendingRequests. The call returns 403 when Cloud VPS access is not turned on for the account. These are not the sizes of fixed-term VPS plans. Those are listed by GET /api/v2/products/vps.
Authentication: An API key with the scope read:services. About keys and scopes
Example
curl "https://cloud.hostup.se/api/v2/vps/payg/limits" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The account’s Cloud VPS limits.
{ "current": { "cpuCores": 4, "memoryGb": 8, "storageGb": 120, "floatingIpCount": 1, "instanceCount": 2, "snapshotCount": 3, "privateNetworkCount": 0, "mailRelayEmails": 1200 }, "max": { "cpuCores": 16, "memoryGb": 64, "storageGb": 1000, "floatingIpCount": 4, "instanceCount": 10, "snapshotCount": 20, "privateNetworkCount": 2, "mailRelayEmails": 15000 }, "remaining": { "cpuCores": 12, "memoryGb": 56, "storageGb": 880, "floatingIpCount": 3, "instanceCount": 8, "snapshotCount": 17, "privateNetworkCount": 2, "mailRelayEmails": 13800 }, "billing": { "cpuPerCoreHour": 0.015, "memoryPerGbHour": 0.004, "storagePerGbHour": 0.00025, "ipPerHour": 0.03, "bandwidthPerGb": 0.01, "currencyCode": "SEK" }, "hasPendingRequests": false, "pendingRequests": []}Response fields
currentobjectWhat the account uses now.
cpuCoresintegerCPU cores.
memoryGbintegerMemory in GB.
storageGbintegerDisk in GB.
floatingIpCountintegerFloating IP addresses.
instanceCountintegerNumber of Cloud VPS.
snapshotCountintegerSnapshots.
privateNetworkCountintegerPrivate networks.
mailRelayEmailsintegerMail relay e-mails this month.
maxobjectThe account’s limits.
cpuCoresintegerCPU cores.
memoryGbintegerMemory in GB.
storageGbintegerDisk in GB.
floatingIpCountintegerFloating IP addresses.
instanceCountintegerNumber of Cloud VPS.
snapshotCountintegerSnapshots.
privateNetworkCountintegerPrivate networks.
mailRelayEmailsintegerMail relay e-mails this month.
remainingobjectWhat is left. Never below 0.
cpuCoresintegerCPU cores.
memoryGbintegerMemory in GB.
storageGbintegerDisk in GB.
floatingIpCountintegerFloating IP addresses.
instanceCountintegerNumber of Cloud VPS.
snapshotCountintegerSnapshots.
privateNetworkCountintegerPrivate networks.
mailRelayEmailsintegerMail relay e-mails this month.
billingobjectCloud VPS prices in the account’s currency. If every rate is 0, the prices could not be loaded. Read
pricing on GET /api/v2/vps/payg/deployments instead.cpuPerCoreHournumberPrice per CPU core per hour, in
currencyCode.memoryPerGbHournumberPrice per GB of memory per hour, in
currencyCode.storagePerGbHournumberPrice per GB of disk per hour, in
currencyCode.ipPerHournumberPrice per extra public IPv4 address per hour, in
currencyCode. The first public IPv4 of each Cloud VPS is included.bandwidthPerGbnumberPrice per GB of bandwidth, in
currencyCode.currencyCodestringISO 4217 currency code of every price.
hasPendingRequestsbooleanWhether a limit increase request is waiting for review.
pendingRequestsarray of objectLimit increase requests waiting for review, newest first.
idstring or nullID of the request (
payglim_…).limitTypestringWhich limit the request raises.
vmCount is the Cloud VPS count. One of cpuCores, memoryGb, storageGb, floatingIpCount, vmCount, snapshotCount, privateNetworkCount, mailRelayEmails.currentLimitintegerAlways
0 today. Read the current limit from max.requestedLimitintegerThe limit asked for.
reasonstring or nullAlways
null today.createdAtstring or nullWhen the request was sent.
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 | Cloud VPS access is not turned on for the account. detail does not say so. access.blockerReasons on GET /api/v2/vps/payg/deployments shows what is missing. A key without the scope also gets 403, with requiredScopes. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 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. |