Skip to main content

Load Balancer Rule

Load balancer rules distribute inbound traffic on a public IP/port across backend instances.

Resource base path: /restapi/loadbalancerrule

MethodPathDescription
POST/restapi/loadbalancerrule/createLoadBalancerRuleCreate Load Balancer Rule
GET/restapi/loadbalancerrule/loadBalancerRuleListLoad Balancer Rule List
PUT/restapi/loadbalancerrule/updateLoadBalancerRuleUpdate Load Balancer Rule
DELETE/restapi/loadbalancerrule/deleteLoadBalancerRule/{uuid}Delete Load Balancer Rule
note

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


Create Load Balancer Rule​

Create Load Balancer Rule.

POST /restapi/loadbalancerrule/createLoadBalancerRule

Request body​

FieldTypeRequiredDescription
privateportstringNoBackend (private) port.
stickinessPolicyUuidstringNo
namestringNoName of the resource.
publicIpUuidstringNo
publicportstringNoPublic-facing port.
networkUuidstringNoUUID of the network.
algorithmstringNoLoad balancer algorithm (source, roundrobin, leastconn) Example: roundrobin
kongLbStickyobjectNo
{
"privateport": "8080",
"stickinessPolicyUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "example-name",
"publicIpUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"publicport": "8080",
"networkUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"algorithm": "roundrobin",
"kongLbSticky": {
"stickyHoldTime": "string",
"stickinessMethod": "None",
"stickinessName": "example-name",
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"cookieName": "example-name"
}
}

Example request​

curl -X POST \
"https://portal.your-domain.com/restapi/loadbalancerrule/createLoadBalancerRule" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"privateport": "8080",
"stickinessPolicyUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "example-name",
"publicIpUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"publicport": "8080",
"networkUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"algorithm": "roundrobin",
"kongLbSticky": {
"stickyHoldTime": "string",
"stickinessMethod": "None",
"stickinessName": "example-name",
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"cookieName": "example-name"
}
}'

Responses​

CodeDescription
200Successful operation.
401Invalid authentication credentials.
550Permission denied.
{
"listLoadBalancerRuleResponse": [
{
"ipAddressUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"stickinessName": "example-name",
"privatePort": "8080",
"name": "example-name",
"publicPort": "8080",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"state": "Running",
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"algorithm": "roundrobin",
"status": "Active"
}
],
"count": 1
}

Load Balancer Rule List​

Load Balancer Rule List.

GET /restapi/loadbalancerrule/loadBalancerRuleList

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/loadbalancerrule/loadBalancerRuleList?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.
{
"listLoadBalancerRuleResponse": [
{
"ipAddressUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"stickinessName": "example-name",
"privatePort": "8080",
"name": "example-name",
"publicPort": "8080",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"state": "Running",
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"algorithm": "roundrobin",
"status": "Active"
}
],
"count": 1
}

Update Load Balancer Rule​

Update Load Balancer Rule.

PUT /restapi/loadbalancerrule/updateLoadBalancerRule

Request body​

FieldTypeRequiredDescription
namestringNoName of the resource.
uuidstringNoUUID of the resource.
algorithmstringNoLoad balancer algorithm (source, roundrobin, leastconn) Example: roundrobin
{
"name": "example-name",
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"algorithm": "roundrobin"
}

Example request​

curl -X PUT \
"https://portal.your-domain.com/restapi/loadbalancerrule/updateLoadBalancerRule" \
-H "apikey: YOUR_API_KEY" \
-H "secretkey: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example-name",
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"algorithm": "roundrobin"
}'

Responses​

CodeDescription
200Successful operation.
202Accepted — processed asynchronously (poll via the Resource API Status endpoint).
401Invalid authentication credentials.
550Permission denied.
{
"listLoadBalancerRuleResponse": [
{
"ipAddressUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"stickinessName": "example-name",
"privatePort": "8080",
"name": "example-name",
"publicPort": "8080",
"zoneUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"state": "Running",
"isActive": true,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"algorithm": "roundrobin",
"status": "Active"
}
],
"count": 1
}

Delete Load Balancer Rule​

Delete Load Balancer Rule.

DELETE /restapi/loadbalancerrule/deleteLoadBalancerRule/{uuid}

Parameters​

ParameterInTypeRequiredDescription
uuidpathstring✅ YesUUID of the resource.

Example request​

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