Skip to main content

OS templates allowed for rebuild on this VPS (service-specific filter)

GET 

/services/:id/os-templates

Selection list for the VPS rebuild operation. ENH-001 (live test 2026-05-19): the list is now service-specific — the ostemplates field from the Virtualizor act=rebuild&vpsid=X form-load call is parsed. This is the list filtered by the media group assigned to the VPS in Virtualizor. Previously a global list (act=ostemplates, 255+ OS) was returned, and when the reseller picked the wrong OS and rebuilt, Virtualizor returned the "The OS you submitted is invalid" error. Now only allowed OSes are shown.

NOTE: The initial order (POST /orders) does NOT USE this endpoint. During provisioning, the WHMCS Virtualizor module assigns the OS from its own config options. This endpoint is only for the rebuild flow.

Cache: APCu, key os_templates:v2:vps:{vpsId} (per-VPS), TTL 300 seconds. Since different VPSes can be in different media groups, a global key is NOT A SOLUTION. Two VPSes in the same media group do not share this cache — practical impact is zero (the OS list is updated about once a month).

Cache invalidation: After the operator adds a new OS image, it appears within at most 5 min. An admin CLI hook for urgent invalidation will come (Phase 4).

Rate limit: Default bucket (60 req/min).

management=basic: 409 management_unavailable.

vps_id null: returns 422 service_not_provisioned — rebuild is not possible anyway for a service awaiting provisioning.

Request​

Responses​

OS template list

Response Headers
    X-RateLimit-Limit

    The per-minute limit defined for this key

    X-RateLimit-Remaining

    Number of requests remaining in the current window

    X-RateLimit-Reset

    Unix epoch of the start of the next window (UTC seconds)