Skip to documentation
DocumentationAPI referenceManage a firewall
POSTBearer token

Manage a firewall

/api/v1/firewalls

Manage organization firewall names, rules, default selection and server attachments.

Before you call

Rule and attachment changes can interrupt SSH access. System resources cannot be edited. Keep the same requestKey on retries; an uncertain supplier result can return 409.

Request example

cURL
curl "https://tovahub.com/api/v1/firewalls" -X POST \
  -H "Authorization: Bearer $TOVAHUB_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
  "action": "create",
  "requestKey": "docs_example_001",
  "name": "my-firewall"
}'

Examples only. No requests are sent from this page.

Parameters

actionJSON body · Required

"create" | "rules" | "rename" | "default" | "servers" | "attach" | "delete"

Each action accepts only its own fields: create (name, rules); rules (id, rules); rename (id, name); default/delete (id); servers (id, serverIds); attach (id, serverId). Every action also requires requestKey.

idJSON body · Optional

string

system or a 24-character firewall ID. Required except for create. System resources cannot be edited.

nameJSON body · Optional

string

Trimmed name, 1–80 characters. Required for create and rename; rejected for other actions.

rulesJSON body · Optional

object[]

At most 64 rules. Required for rules; defaults to [] for create. Each rule requires displayName (1–255 chars), protocol (tcp, udp, icmp or empty string), destPorts (up to 15 ports/ranges, 0–65535), ipv4 (up to 100 IPs/CIDRs or AnyIPv4), ipv6 (up to 100 IPs/CIDRs or AnyIPv6), action: accept and status: active. At least one IP list must be nonempty. TCP/UDP need ports; ICMP needs no ports.

requestKeyJSON body · Required

string

8–100 characters: A–Z, a–z, 0–9, underscore or hyphen. Keep the same key and identical input when retrying the same operation.

serverIdsJSON body · Optional

string[]

Required for servers. Up to 100 platform server IDs, each 24 hexadecimal characters.

serverIdJSON body · Optional

string

Required for attach. A platform server ID with 24 hexadecimal characters.

Response

HTTP status 200

Return the confirmed firewall mutation result; uncertain supplier results raise an error rather than a fabricated task receipt.

okboolean (true)

The requested firewall operation completed or replayed successfully.

pendingboolean (false)

Current successful implementation branches always return false.

idstring

Affected local firewall identifier, or system where the action permits it.