Skip to main content

Port Forwarding Rule

Forward a public IP:port to a private instance IP:port.

Resource base path: /restapi/portforwardingrule

MethodPathDescription
POST/restapi/portforwardingrule/createPortForwardingRuleCreate Port Forwarding Rule
GET/restapi/portforwardingrule/portForwardingRuleListPort 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

FieldTypeRequiredDescription
ipAddressUuidstringNoUUID of the public IP address.
protocolstringNoLoad balancer algorithm (TCP, UDP) Example: TCP
privateEndPortstringNo
privatePortstringNoBackend (private) port.
publicEndPortstringNo
publicPortstringNoPublic-facing port.
virtualmachineUuidstringNoUUID of the virtual-machine instance.
networkUuidstringNoUUID 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

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

ParameterInTypeRequiredDescription
zoneUuidquerystring✅ YesUUID of the zone the resource belongs to.
uuidquerystringNoUUID of the resource.
vmUuidquerystringNoUUID of the virtual-machine instance.
ipAddressUuidquerystringNoUUID 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

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

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

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