Port Forwarding Rule
Forward a public IP:port to a private instance IP:port.
Resource base path: /restapi/portforwardingrule
| Method | Path | Description |
|---|---|---|
POST | /restapi/portforwardingrule/createPortForwardingRule | Create Port Forwarding Rule |
GET | /restapi/portforwardingrule/portForwardingRuleList | Port Forwarding Rule List |
DELETE | /restapi/portforwardingrule/deletePortForwardingRule/{uuid} | Delete Port Forwarding Rule |
note
apikey and secretkey are required HTTP headers on every request and are omitted from the parameter tables below. See Authentication.
Create Port Forwarding Rule
Create Port Forwarding Rule.
POST /restapi/portforwardingrule/createPortForwardingRule
Request body
| Field | Type | Required | Description |
|---|---|---|---|
ipAddressUuid | string | No | UUID of the public IP address. |
protocol | string | No | Load balancer algorithm (TCP, UDP) Example: TCP |
privateEndPort | string | No | |
privatePort | string | No | Backend (private) port. |
publicEndPort | string | No | |
publicPort | string | No | Public-facing port. |
virtualmachineUuid | string | No | UUID of the virtual-machine instance. |
networkUuid | string | No | UUID of the network. |
{
"ipAddressUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"protocol": "TCP",
"privateEndPort": "8080",
"privatePort": "8080",
"publicEndPort": "8080",
"publicPort": "8080",
"virtualmachineUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"networkUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Example request
curl -X POST \
"https://portal.your-domain.com/restapi/portforwardingrule/createPortForwardingRule" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"ipAddressUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"protocol": "TCP",
"privateEndPort": "8080",
"privatePort": "8080",
"publicEndPort": "8080",
"publicPort": "8080",
"virtualmachineUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"networkUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'
Responses
| Code | Description |
|---|---|
200 | Successful operation. |
401 | Invalid authentication credentials. |
550 | Permission denied. |
{
"listPortForwardingResponse": [
{
"ipAddressUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"protocol": "TCP",
"virtualMachineName": "example-name",
"privatePort": "8080",
"privateEndPort": "8080",
"publicPort": "8080",
"publicEndPort": "8080",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}
],
"count": 1
}
Port Forwarding Rule List
Port Forwarding Rule List.
GET /restapi/portforwardingrule/portForwardingRuleList
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. |
vmUuid | query | string | No | UUID of the virtual-machine instance. |
ipAddressUuid | query | string | No | UUID of the public IP address. |
Example request
curl -X GET \
"https://portal.your-domain.com/restapi/portforwardingrule/portForwardingRuleList?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. |
{
"listPortForwardingResponse": [
{
"ipAddressUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"protocol": "TCP",
"virtualMachineName": "example-name",
"privatePort": "8080",
"privateEndPort": "8080",
"publicPort": "8080",
"publicEndPort": "8080",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "Active"
}
],
"count": 1
}
Delete Port Forwarding Rule
Delete Port Forwarding Rule.
DELETE /restapi/portforwardingrule/deletePortForwardingRule/{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/portforwardingrule/deletePortForwardingRule/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