Add, modify, or delete firewall rules on your virtual server (VPS). This controls incoming and outgoing traffic to protect your server. The endpoint returns a 'requestId' to track the operation in audit logs.
vmid integer · min: 1 required Example Unique vmid identifier
pos string required 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 PUT "https://cloud.hostup.se/api/vm/17562/firewall?pos=string" \
-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
},
"pos": "string",
"message": "string"
}
} {
"type": "group",
"action": "ACCEPT",
"proto": "icmp",
"dport": "string",
"source": "string",
"comment": "string",
"enable": 0
}