ScalixScalix Docs
Sign up

Load Balancer API

Load balancer API to create and manage layer-7 load balancers in Scalix Cloud and attach or remove backends for distributing traffic.

Status: configuration only. This API manages load balancer definitions and their backends (strategy, weights, health-check settings). It does not yet provision a public address: a load balancer has no routable hostname or IP, and requests are not distributed through it. Route traffic through your own ingress or a Run service until the data path ships.

REST API endpoints for Load Balancer. 6 operations.

List load balancers

plaintext
GET /v1/lb

Returns all load balancers belonging to the caller's project.

Auth: Bearer API key

Responses

StatusDescription
200All load balancers for the caller's project
401Missing or invalid credentials
403Token lacks the lb:read scope
500Internal error

operationId: listLoadBalancers

Create a load balancer

plaintext
POST /v1/lb

Provisions a load balancer for the caller's project and returns its details.

Auth: Bearer API key

Request body

application/json (required) — schema CreateLbRequest.

FieldTypeRequiredDescription
namestringYes
strategyStrategy enum: round_robin, least_connections, weighted_round_robin, ip_hashNo
backendsarray<AddBackendRequest>No
health_checkobjectNo

Nested schema — AddBackendRequest:

FieldTypeRequiredDescription
urlstringYes
weightinteger (int32)No

Responses

StatusDescription
200Load balancer created
401Missing or invalid credentials
403Token lacks the lb:write scope
500Internal error

operationId: createLoadBalancer

Delete a load balancer

plaintext
DELETE /v1/lb/{id}

Removes a load balancer and its backends by id.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
idpathstringYesLoad balancer id (UUID)

Responses

StatusDescription
200Load balancer deleted
401Missing or invalid credentials
403Token lacks the lb:write scope
404Load balancer not found
500Internal error

operationId: deleteLoadBalancer

Get a load balancer

plaintext
GET /v1/lb/{id}

Returns a single load balancer by id.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
idpathstringYesLoad balancer id (UUID)

Responses

StatusDescription
200The load balancer
401Missing or invalid credentials
403Token lacks the lb:read scope
404Load balancer not found
500Internal error

operationId: getLoadBalancer

Add a backend to a load balancer

plaintext
POST /v1/lb/{id}/backends

Registers a backend target on the load balancer and returns its details.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
idpathstringYesLoad balancer id (UUID)

Request body

application/json (required) — schema AddBackendRequest.

FieldTypeRequiredDescription
urlstringYes
weightinteger (int32)No

Responses

StatusDescription
200Backend added
400Load balancer not found or invalid backend
401Missing or invalid credentials
403Token lacks the lb:write scope
500Internal error

operationId: addLoadBalancerBackend

Remove a backend from a load balancer

plaintext
DELETE /v1/lb/{id}/backends/{backend_id}

Deletes a backend target from the load balancer by id.

Auth: Bearer API key

Parameters

NameInTypeRequiredDescription
idpathstringYesLoad balancer id (UUID)
backend_idpathstringYesBackend id (UUID)

Responses

StatusDescription
200Backend removed
401Missing or invalid credentials
403Token lacks the lb:write scope
404Load balancer or backend not found
500Internal error

operationId: removeLoadBalancerBackend