Logo
OpenScaler
API Documentation/Load Balancer Public Ports

Open a Public Port on a Load Balancer

Expose an internal port of the load balancer to the internet. Returns the public port allocated for the request.

POST
/v1/lbs/{lb_id}/public_ports

Authorization

AuthorizationRequiredBearer <token>

OAuth Authentication

OpenScaler API uses OAuth, a standard for secure authorization. To access the API, obtain a token via the OpenScaler Platform.

Use the access_token in the Authorization header for requests:

Authorization: Bearer <token>

Always keep your token secure and do not share it with anyone.

In: header

Request Body

application/jsonRequired
portRequiredinteger

Internal port to expose (e.g. 80, 443).

descstring

Optional description for this port mapping (e.g. "HTTP").

Path Parameters

lb_idRequiredstring

A unique identifier for a load balancer instance.

curl -X POST "https://api.alpha.openscaler.net/v1/lbs/42/public_ports" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "port": 80,
    "desc": "HTTP"
  }'

Port opened successfully.

{
  "public_port": 32001
}