Update firewall rules
/api/v1/firewalls/rules
Replace the rules of an editable team firewall. If it has a Contabo resource, verify the update there before saving.
Before you call
Rule changes affect attached servers and may interrupt SSH. System firewalls cannot be edited.
Request example
curl "https://tovahub.com/api/v1/firewalls/rules" -X POST \
-H "Authorization: Bearer $TOVAHUB_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"id": "507f1f77bcf86cd799439012",
"rules": [],
"requestKey": "docs_example_001"
}'Examples only. No requests are sent from this page.
Parameters
idJSON body · Requiredstring
A 24-character ID for an editable firewall owned by the current team.
rulesJSON body · Requiredobject[]
Up to 64 active accept rules. Each rule requires displayName (1–255 chars), protocol (tcp, udp, icmp or empty string), destPorts (up to 15 ports/ranges, 0–65535), srcCidr.ipv4 (up to 100 IPs/CIDRs or AnyIPv4), srcCidr.ipv6 (up to 100 IPs/CIDRs or AnyIPv6), action: accept and status: active. At least one source list must be nonempty. TCP/UDP need ports; ICMP needs no ports.
requestKeyJSON body · Requiredstring
8–100 characters: A–Z, a–z, 0–9, underscore or hyphen. Keep the same key and identical input when retrying the same operation.
Response
HTTP status 200
Return the firewall with its saved rules.
_idstring (ObjectId)Local firewall identifier.
originIdstring (optional)Supplier firewall identifier.
namestringCustomer-selected name saved locally; independent of the Contabo name.
rulesarraySaved firewall rules.
serverCountnumberNumber of current-team servers attached to this firewall.