Get VPS firewall options
GET /api/v2/vps/{id}/firewall/options
Get whether the VPS firewall is on and what happens to incoming traffic that matches no rule. platformFilteringInbound is true when the firewall is on and unmatched traffic is kept out. Only traffic that matches an allow rule then reaches the VPS. source: "fallback" and available: false mean the live state could not be read. The values are then defaults, not the real state. Change the options with PUT /api/v2/vps/{id}/firewall/options.
Authentication: An API key with the scope read:vm. About keys and scopes
Request
Path parameters
idstringrequiredThe VPS ID (
vps_…).Example
curl "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/firewall/options" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 Firewall options.
{ "enabled": true, "inboundPolicy": "DROP", "platformFilteringInbound": true, "available": true, "reason": null, "source": "live", "mode": "enabled_restrictive", "summary": "Firewall protection is on. Incoming traffic must match an allow rule to pass.", "detail": "Traffic that does not match an allow rule is blocked on our side before it reaches the VM.", "actions": { "canUpdate": { "allowed": true, "reason": null } }}Response fields
enabledbooleanThe firewall’s main switch. It is
true on a new VPS even while protection is off. platformFilteringInbound says whether incoming traffic is filtered.inboundPolicystringWhat happens to incoming traffic that matches no rule.
ACCEPT lets it in. DROP discards it. REJECT refuses it. One of ACCEPT, DROP, REJECT.platformFilteringInboundbooleanTrue when the firewall is on and incoming traffic that matches no rule is kept out.
availablebooleanWhether the live state could be read.
reasonstring or nullWhy the state is unavailable. Null when it is available.
sourcestring or nulllive when read from the VPS now. fallback when the live state could not be read and defaults are shown.modestring or nulldisabled, enabled_allow_all (on and unmatched traffic still gets in) or enabled_restrictive (on and only allowed traffic gets in).summarystring or nullThe state in one sentence.
detailstring or nullWhat the state means for incoming traffic.
actionsobjectWhat you can do with the options now.
canUpdateobjectWhether the options can be changed now.
allowedbooleanreasonstring or nullcodestring or nullA machine-readable code for why the action is blocked.
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 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is vps_not_found. |
| 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. |