Skip to content

Get Cloud VPS deployment options

GET /api/v2/vps/payg/deployments

Shows whether the account can create a Cloud VPS. It also returns the hourly prices, the default and allowed sizes and the regions. Call it before POST /api/v2/vps/payg/deployments. When actions.canDeploy.allowed is false, access.blockerReasons lists every blocker as a code. Go by those codes. reason is a short general text about one of them. Prices are in the account’s currency. Fixed-term VPS plans are listed by GET /api/v2/products/vps instead. actions.canDeploy does not show an overdue Cloud VPS invoice. The create call then returns 403 payg_payment_overdue.

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

Example

GET /api/v2/vps/payg/deployments
curl "https://cloud.hostup.se/api/v2/vps/payg/deployments" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 Deployment options for the account.

Response 200
{
"available": true,
"reason": null,
"access": {
"available": true,
"reason": null,
"countryCode": "SE",
"countryPaymentAvailable": true,
"standardCountry": true,
"trustedHistoryRequired": true,
"trustedHistoryEligible": true,
"paidSpendSek": 3450,
"trustedHistoryThresholdSek": 2000,
"requiresCard": false,
"hasCard": false,
"verified": true,
"cloudAccessEnabled": true,
"blockerReasons": []
},
"actions": {
"canDeploy": {
"allowed": true,
"reason": null
}
},
"pricing": {
"currencyCode": "SEK",
"cpuPerCoreHour": 0.015,
"memoryPerGbHour": 0.004,
"storagePerGbHour": 0.00025,
"bandwidthPerGb": 0.01,
"ipPerHour": 0.03
},
"defaults": {
"regionId": "stockholm",
"resources": {
"cpuCores": 2,
"memoryGb": 2,
"storageGb": 50
}
},
"limits": {
"cpuCores": {
"min": 1,
"max": 32
},
"memoryGb": {
"min": 1,
"max": 256
},
"storageGb": {
"min": 50,
"max": 2000
}
},
"regions": [
{
"id": "stockholm",
"name": "Stockholm, Sweden",
"available": true
}
]
}
Response fields
availableboolean
Whether the account can create a Cloud VPS now. Same as actions.canDeploy.allowed.
reasonstring or null
Why the account cannot create a Cloud VPS. null when it can.
accessobject | null
What the account has in place for pay-as-you-go.
availableboolean
Whether the account can create a Cloud VPS now.
reasonstring or null
Why it cannot. null when it can.
countryCodestring or null
Country of the billing account, as an ISO 3166-1 alpha-2 code.
countryPaymentAvailableboolean
Whether the billing side is in place: a country is set, the paid history is enough and a card is on file where one is needed.
standardCountryboolean
Whether the account’s country is on the standard pay-as-you-go country list.
trustedHistoryRequiredboolean
Whether the account needs a paid billing history. true for every account today.
trustedHistoryEligibleboolean
Whether paidSpendSek has reached trustedHistoryThresholdSek.
paidSpendSeknumber
Total the account has paid so far, in SEK.
trustedHistoryThresholdSeknumber
Paid total the account needs before pay-as-you-go opens, in SEK.
requiresCardboolean
Whether the account must have a card on file.
hasCardboolean
Whether a card is on file. false when no card is needed.
verifiedboolean
Whether the account holder has verified their identity.
cloudAccessEnabledboolean
Whether Cloud VPS access is turned on for the account.
blockerReasonsarray of string
Every reason the account cannot deploy. Empty when it can. country_not_supported: no country on the billing account. insufficient_trusted_history: paid total below the threshold. no_card_on_file: a card is needed. not_verified: identity not verified. no_cloud_access: Cloud VPS access is not turned on.
actionsobject
What the account can do.
canDeployobject
Whether POST /api/v2/vps/payg/deployments is allowed now.
allowedboolean
true when the account can create a Cloud VPS.
reasonstring or null
Why it cannot. null when it can.
pricingobject
Cloud VPS prices in the account’s currency.
currencyCodestring
ISO 4217 currency code of every price.
cpuPerCoreHournumber
Price per CPU core per hour, in currencyCode.
memoryPerGbHournumber
Price per GB of memory per hour, in currencyCode.
storagePerGbHournumber
Price per GB of disk per hour, in currencyCode.
bandwidthPerGbnumber
Price per GB of bandwidth, in currencyCode.
ipPerHournumber
Price per extra public IPv4 address per hour, in currencyCode. The first public IPv4 of each Cloud VPS is included.
defaultsobject
The size and region to suggest when the caller has no preference.
regionIdstring
Default region id.
resourcesobject
Default size.
cpuCoresinteger
CPU cores.
memoryGbinteger
Memory in GB.
storageGbinteger
Disk size in GB.
limitsobject
Smallest and largest size you can request for one Cloud VPS.
cpuCoresobject
CPU cores.
mininteger
maxinteger
memoryGbobject
Memory in GB.
mininteger
maxinteger
storageGbobject
Disk size in GB.
mininteger
maxinteger
regionsarray of object
Regions a Cloud VPS can be created in.
idstring or null
Region ID to send as region when you create a Cloud VPS.
namestring or null
Display name.
availableboolean
Whether new Cloud VPS can be created in the region now.

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.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller.
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.