Skip to navigation

Update a firewall rule

Changes an existing rule in a firewall group. Requires scope: firewall.write.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
# FIREWALL_GROUP_ID: Firewall group ID
# FIREWALL_RULE_ID: Firewall rule ID
curl -X PATCH "https://api.ibee.ai/v1/networking/firewall-groups/$FIREWALL_GROUP_ID/rules/$FIREWALL_RULE_ID?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"description": "<description>", "direction": "ingress"}'

Authentication

AuthorizationBearer

IBEE platform API token. Production tokens start with ibee_prod_key_; development tokens start with ibee_dev_key_. Use a token only with its matching gateway environment.

Path parameters

firewall_group_idstringRequired
Firewall group ID.
firewall_rule_idstringRequired
Firewall rule ID.

Query parameters

workspace_idstringRequiredformat: "^[1-9][0-9]*$">=1 character

The positive numeric workspace ID to scope this request to. Zero, negative, and non-numeric values are rejected.

Request

This endpoint expects an object.
descriptionstring or nullOptional
Optional description of the rule.
directionenumOptionalDefaults to ingress
  • ingress: traffic into the VM (default).
  • egress: traffic out of the VM.
Allowed values:
protocolenumOptionalDefaults to tcp
  • tcp (default)
  • udp
  • icmp
  • any: all protocols.
Allowed values:
port_startinteger or nullOptional1-65535

First port of the range (1-65535). Required for tcp and udp; ignored for other protocols.

port_endinteger or nullOptional1-65535

Last port of the range (1-65535). Defaults to port_start.

remote_targetslist of stringsOptional

Remote IPv4 addresses or CIDRs the rule matches, for example 0.0.0.0/0.

actionenumOptionalDefaults to allow
  • allow: let matching traffic through (default).
  • drop: discard matching traffic.
Allowed values:
priorityinteger or nullOptional
Evaluation priority of the rule.
enabledbooleanOptional
Whether the rule is applied.

Response

Firewall rule updated successfully.
firewall_group_idstring
Unique ID of the group.
organization_idstring
ID of the owning organization.
workspace_idstring
ID of the owning workspace.
namestring
Display name of the group.
is_defaultboolean
Whether this is the workspace's default group.
statusstring

Status of the group; active when usable.

ruleslist of objects
Rules in the group.
created_atdatetime

When the resource was created (ISO 8601).

updated_atdatetime

When the resource was last changed (ISO 8601).

workspace_namestringOptional
Display name of the workspace.
descriptionstring or nullOptional
Description of the group.
linked_instance_countintegerOptional>=0
Number of VMs the group is attached to.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
413
Content Too Large Error
422
Unprocessable Entity Error
423
Locked Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error