Skip to main content
PATCH
/
api
/
public
/
v1
/
firewalls
/
{id}
/
rules
/
{ruleId}
Update a firewall rule
curl --request PATCH \
  --url https://api.vmarea.com/api/v1/api/public/v1/firewalls/{id}/rules/{ruleId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "position": 500,
  "direction": "IN",
  "action": "ACCEPT",
  "protocol": "TCP",
  "port": "<string>",
  "sourceIps": [
    "<string>"
  ],
  "destIps": [
    "<string>"
  ],
  "description": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "firewallId": "<string>",
    "position": 123,
    "direction": "IN",
    "action": "ACCEPT",
    "protocol": "TCP",
    "port": "<string>",
    "sourceIps": [
      "<string>"
    ],
    "destIps": [
      "<string>"
    ],
    "description": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.vmarea.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Long-lived API token created at https://vmarea.com/dashboard/settings/api-keys. Tokens are scope-restricted; this spec lists the scope each endpoint requires.

Path Parameters

id
string
required
ruleId
string
required

Body

application/json
position
integer
Required range: 0 <= x <= 1000
direction
enum<string>
Available options:
IN,
OUT
action
enum<string>
Available options:
ACCEPT,
DROP,
REJECT
protocol
enum<string>
Available options:
TCP,
UDP,
ICMP,
ESP,
GRE,
ANY
port
string | null
Maximum string length: 64
sourceIps
string[]
Maximum array length: 50
Maximum string length: 64
destIps
string[]
Maximum array length: 50
Maximum string length: 64
description
string | null
Maximum string length: 255

Response

Default Response

success
enum<boolean>
required
Available options:
true
data
object
required