Skip to content

Check VPS reachability from the internet

GET /api/v2/vps/{id}/diagnostics/connectivity

Test from the internet whether the VPS answers on common TCP ports. The test connects to the VPS’s own primary IP address. You cannot point it at another host. By default it tests ports 22, 80, 443 and 3389. Pass ports to test other ports, up to 6. Each port is open, closed (the server refused the connection) or no_response (nothing answered within 3 seconds). verdict sums them up. all_clear: every port accepted a connection. host_up_some_services_down: some ports accepted a connection and others did not. host_up_no_services: no port accepted a connection. The server is up because it refused at least one. network_unreachable: nothing answered. The VPS may be off or failed to boot. A firewall may also drop everything. no_public_ip: the VPS has no address to test.

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

Request

Path parameters

idstringrequired
The VPS ID (vps_…).

Query parameters

portsstring
Comma-separated TCP ports to test, at most 6. Default 22,80,443,3389. Values that are not ports are ignored.

Example

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

Responses

200 Verdict and the result for each port.

Response 200
{
"verdict": "host_up_some_services_down",
"host": "192.0.2.10",
"ports": [
{
"port": 3389,
"verdict": "open",
"detail": null,
"latencyMs": 12,
"label": "RDP (Windows remote desktop)"
},
{
"port": 22,
"verdict": "no_response",
"detail": "timeout",
"latencyMs": null,
"label": "SSH"
}
],
"checkedAt": "2026-08-02T15:04:05.000Z"
}
Response fields
verdictstring
Sum of the port results. One of all_clear, host_up_some_services_down, host_up_no_services, network_unreachable, no_public_ip.
hoststring or null
The address that was tested. Null only with no_public_ip.
portsarray of object
One row per tested port.
portinteger
TCP port.
verdictstring
open: a service accepted the connection. closed: the server refused it. no_response: nothing answered. One of open, closed, no_response.
detailstring or null
Why there was no answer, for example timeout. Null for open and closed.
latencyMsnumber or null
Time to connect in milliseconds for an open port. Null otherwise.
labelstring or null
Common name of the port, for example SSH. Null for other ports.
checkedAtstring
When the test ran.

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; 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.