Skip to main content

Egress Rule

Egress (outbound) firewall rules for a guest network.

Resource base path: /restapi/egressrule

MethodPathDescription
POST/restapi/egressrule/createEgressRuleCreate Egress Rule
GET/restapi/egressrule/egressRuleListEgress 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​

FieldTypeRequiredDescription
startPortstringNoFirst port in the range.
icmpTypestringNo
protocolstring✅ YesEgressRule protocol (TCP, UDP,ICMP) Example: TCP
cidrListstringNoCIDR range the rule applies to (for example, 0.0.0.0/0).
icmpCodestringNo
endPortstringNoLast port in the range.
networkUuidstringNoUUID 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​

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission 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​

ParameterInTypeRequiredDescription
zoneUuidquerystring✅ YesUUID of the zone the resource belongs to.
uuidquerystringNoUUID of the resource.
networkUuidquerystringNoUUID 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​

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission 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​

ParameterInTypeRequiredDescription
uuidpathstring✅ YesUUID 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​

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission denied.
true