Skip to content

List the operating systems for a VPS

GET /api/v2/vps/{id}/templates

Lists the operating system templates you can install on a VPS with POST /api/v2/vps/{id}/actions/rebuild. Send a template id as templateId. A rebuild erases all data on the VPS. Windows templates are left out while Windows Server is not offered.

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

Request

Path parameters

idstringrequired
The VPS ID (vps_…).

Example

GET /api/v2/vps/{id}/templates
curl "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/templates" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 The templates: Debian, Ubuntu, Rocky Linux, AlmaLinux, Windows, then the rest. Newest version first within a family.

Response 200
{
"templates": [
{
"id": "os_01hxa3b4c5d6e7f8g9h0j1k2m4",
"name": "Debian 12",
"family": "debian",
"version": "12",
"licensing": null,
"licensingNotice": null
},
{
"id": "os_01hxa3b4c5d6e7f8g9h0j1k2m3",
"name": "Ubuntu 24.04",
"family": "ubuntu",
"version": "24.04",
"licensing": null,
"licensingNotice": null
}
]
}
Response fields
templatesarray of object
Templates you can install on this VPS.
idstring
Template ID. Send it as templateId to POST /api/v2/vps/{id}/actions/rebuild.
namestring
Display name, such as Ubuntu 24.04.
familystring or null
Operating system family in lower case, such as debian. Null when unknown.
versionstring or null
Version, such as 24.04. Null when unknown.
licensingstring or null
byol when you must bring your own licence. Null otherwise.
licensingNoticestring or null
Text to show next to a byol template. Null otherwise.

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 API key lacks read:vm (requiredScopes lists it) or the account is not active. A VPS on another account answers 404 vps_not_found.
404Not found. The resource does not exist or is not owned by the caller; code is vps_not_found.
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.