Skip to main content

Firewall Rule

Ingress firewall rules on a public IP.

Resource base path: /restapi/firewallrule

MethodPathDescription
POST/restapi/firewallrule/createFirewallRuleCreate Firewall Rule
GET/restapi/firewallrule/firewallRuleListFirewall Rule List
DELETE/restapi/firewallrule/deleteFirewallRule/{uuid}Delete Firewall Rule
note

apikey and secretkey are required HTTP headers on every request and are omitted from the parameter tables below. See Authentication.


Create Firewall Rule

Create Firewall Rule.

POST /restapi/firewallrule/createFirewallRule

Request body

FieldTypeRequiredDescription
startPortstringNoFirst port in the range.
ipAddressUuidstringNoUUID of the public IP address.
icmpTypestringNo
protocolstring✅ YesFirewallRule 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.
{
"startPort": "8080",
"ipAddressUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"icmpType": "string",
"protocol": "TCP",
"cidrList": "0.0.0.0/0",
"icmpCode": "string",
"endPort": "8080"
}

Example request

curl -X POST \
"https://portal.your-domain.com/restapi/firewallrule/createFirewallRule" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"startPort": "8080",
"ipAddressUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"icmpType": "string",
"protocol": "TCP",
"cidrList": "0.0.0.0/0",
"icmpCode": "string",
"endPort": "8080"
}'

Responses

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission denied.
{
"count": 1,
"listFirewallRuleResponse": [
{
"startPort": "8080",
"ipAddressUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"icmpType": "string",
"protocol": "TCP",
"cidrList": "0.0.0.0/0",
"icmpCode": "string",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"endPort": "8080",
"status": "Active"
}
]
}

Firewall Rule List

Firewall Rule List.

GET /restapi/firewallrule/firewallRuleList

Parameters

ParameterInTypeRequiredDescription
zoneUuidquerystring✅ YesUUID of the zone the resource belongs to.
uuidquerystringNoUUID of the resource.
ipAddressUuidquerystringNoUUID of the public IP address.

Example request

curl -X GET \
"https://portal.your-domain.com/restapi/firewallrule/firewallRuleList?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.
{
"count": 1,
"listFirewallRuleResponse": [
{
"startPort": "8080",
"ipAddressUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"icmpType": "string",
"protocol": "TCP",
"cidrList": "0.0.0.0/0",
"icmpCode": "string",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"endPort": "8080",
"status": "Active"
}
]
}

Delete Firewall Rule

Delete Firewall Rule.

DELETE /restapi/firewallrule/deleteFirewallRule/{uuid}

Parameters

ParameterInTypeRequiredDescription
uuidpathstring✅ YesUUID of the resource.

Example request

curl -X DELETE \
"https://portal.your-domain.com/restapi/firewallrule/deleteFirewallRule/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