Configure firewall rules for your virtual server (VPS). Specify incoming traffic, protocols, ports, and source addresses to protect your server. This API returns a 'requestId' to track your request status.
vmid integer · min: 1 required Example Unique vmid identifier
Accept Example Content-Type Example type string · enum required group in out action string · enum required ACCEPT DROP REJECT proto string · enum required icmp tcp udp dport string required source string required comment string required enable integer required success boolean timestamp string requestId string data object error string message string code string timestamp string requestId string https://cloud.hostup.se/api/vm/{vmid}/firewall curl -X POST "https://cloud.hostup.se/api/vm/11284/firewall" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "group",
"action": "ACCEPT",
"proto": "icmp",
"dport": "string",
"source": "string",
"comment": "string",
"enable": 0
}' {
"success": true,
"timestamp": "string",
"requestId": "string",
"data": {
"success": true,
"rule": {
"type": "string",
"action": "string",
"proto": "string",
"dport": "string",
"source": "string",
"comment": "string",
"enable": 0
},
"message": "string"
}
} {
"type": "group",
"action": "ACCEPT",
"proto": "icmp",
"dport": "string",
"source": "string",
"comment": "string",
"enable": 0
}