Egress Rule
Egress (outbound) firewall rules for a guest network.
Resource base path: /restapi/egressrule
| Method | Path | Description |
|---|---|---|
POST | /restapi/egressrule/createEgressRule | Create Egress Rule |
GET | /restapi/egressrule/egressRuleList | Egress Rule List |
DELETE | /restapi/egressrule/deleteEgressRule/{uuid} | Delete Egress Rule |
note
apikey and secretkey are required HTTP headers on every request and are omitted from the parameter tables below. See Authentication.
Create Egress Rule
Create Egress Rule.
POST /restapi/egressrule/createEgressRule
Request body
| Field | Type | Required | Description |
|---|---|---|---|
startPort | string | No | First port in the range. |
icmpType | string | No | |
protocol | string | ✅ Yes | EgressRule protocol (TCP, UDP,ICMP) Example: TCP |
cidrList | string | No | CIDR range the rule applies to (for example, 0.0.0.0/0). |
icmpCode | string | No | |
endPort | string | No | Last port in the range. |
networkUuid | string | No | UUID of the network. |
{
"startPort": "8080",
"icmpType": "string",
"protocol": "TCP",
"cidrList": "0.0.0.0/0",
"icmpCode": "string",
"endPort": "8080",
"networkUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Example request
curl -X POST \
"https://portal.your-domain.com/restapi/egressrule/createEgressRule" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"startPort": "8080",
"icmpType": "string",
"protocol": "TCP",
"cidrList": "0.0.0.0/0",
"icmpCode": "string",
"endPort": "8080",
"networkUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'
Responses
| Code | Description |
|---|---|
200 | Successful operation. |
401 | Invalid authentication credentials. |
550 | Permission denied. |
{
"listEgressRuleResponse": [
{
"startPort": "8080",
"icmpType": "string",
"protocol": "TCP",
"icmpCode": "string",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"endPort": "8080",
"networkUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}
],
"count": 1
}
Egress Rule List
Egress Rule List.
GET /restapi/egressrule/egressRuleList
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
zoneUuid | query | string | ✅ Yes | UUID of the zone the resource belongs to. |
uuid | query | string | No | UUID of the resource. |
networkUuid | query | string | No | UUID of the network. |
Example request
curl -X GET \
"https://portal.your-domain.com/restapi/egressrule/egressRuleList?zoneUuid=a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Responses
| Code | Description |
|---|---|
200 | Successful operation. |
401 | Invalid authentication credentials. |
550 | Permission denied. |
{
"listEgressRuleResponse": [
{
"startPort": "8080",
"icmpType": "string",
"protocol": "TCP",
"icmpCode": "string",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"endPort": "8080",
"networkUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}
],
"count": 1
}
Delete Egress Rule
Delete Egress Rule.
DELETE /restapi/egressrule/deleteEgressRule/{uuid}
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
uuid | path | string | ✅ Yes | UUID of the resource. |
Example request
curl -X DELETE \
"https://portal.your-domain.com/restapi/egressrule/deleteEgressRule/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY"
Responses
| Code | Description |
|---|---|
200 | Successful operation. |
401 | Invalid authentication credentials. |
550 | Permission denied. |
true