Load balancers
A network load balancer is an IP address that the platform distributes across a set of member instances. Workspace members interact with load balancers through the workspace-scoped paths described below. Creating and deleting a load balancer are Administrator-only operations and are exposed on flat /v1/net-lbs paths. See Workspaces and scope and Pagination for the conventions these endpoints follow.
List load balancers
/v1/workspaces/{wid}/net-lbsList load balancers in a workspaceReturns the load balancers owned by a workspace, with pagination.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Query parameters
| Name | Type | Description |
|---|---|---|
q | string | Quick search by name or ID |
id | integer[] | Filter to specific load balancer IDs |
name | string | Filter by name |
address | string | Filter by IP address |
owner | integer[] | Filter by workspace ID |
instances | integer[] | Filter to balancers that have any of these instance IDs as members |
Plus the shared pagination parameters. Returns a paged list of load balancer objects, each containing id, name, address, and owner (workspace summary).
curl https://api.galaxygate.net/v1/workspaces/42/net-lbs \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-A 'curl/8.5'Fetch a load balancer
/v1/workspaces/{wid}/net-lbs/{bid}Fetch load balancer detailPath parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
bid | integer | Load balancer ID |
Returns the load balancer detail: id, name, address, and owner (workspace summary).
Update a load balancer
/v1/workspaces/{wid}/net-lbs/{bid}Update load balancer settingsUpdates load balancer settings. Send only the fields you want to change; omit a field to leave it unchanged.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
bid | integer | Load balancer ID |
Request body
| Field | Type | Description |
|---|---|---|
name | string | Rename the load balancer |
address | string | Change the IP address of the load balancer |
owner | integer | Reassign to a different workspace by workspace ID |
Returns nothing on success (200 OK).
List member instances
/v1/workspaces/{wid}/net-lbs/{bid}/instancesList member instancesReturns the instances currently attached to the load balancer, with pagination.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
bid | integer | Load balancer ID |
Query parameters
Standard instance search parameters (q, ip, id, name, node, plan, iso, online, state) may be passed to narrow results. Plus the shared pagination parameters.
Returns a paged list of instance summaries, each containing id and name.
Add a member instance
/v1/workspaces/{wid}/net-lbs/{bid}/instances/{iid}Attach an instance to a load balancerAttaches an instance to the load balancer. The instance must belong to the same workspace. Responds 202 Accepted because the attachment is asynchronous.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
bid | integer | Load balancer ID |
iid | integer | Instance ID to attach |
No request body. Returns 202 Accepted with no body.
Remove a member instance
/v1/workspaces/{wid}/net-lbs/{bid}/instances/{iid}Detach an instance from a load balancerDetaches an instance from the load balancer. Responds 202 Accepted because the detachment is asynchronous.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
bid | integer | Load balancer ID |
iid | integer | Instance ID to detach |
No request body. Returns 202 Accepted with no body.
Administrator endpoints
The following endpoints are restricted to Administrator tokens. They operate on flat paths without a workspace prefix and are the only way to create or delete a load balancer.
Create a load balancer
/v1/net-lbsCreate a load balancerCreates a new load balancer and assigns it to a workspace.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Display name for the load balancer |
address | string | yes | IP address to assign to the load balancer |
owner | integer | yes | Workspace ID that will own this load balancer |
curl -X POST https://api.galaxygate.net/v1/net-lbs \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-H "Content-Type: application/json" \
-A 'curl/8.5' \
-d '{
"name": "lb-203-0-113-10",
"address": "203.0.113.10",
"owner": 42
}'Returns the full load balancer detail: id, name, address, and owner.
Delete a load balancer
/v1/net-lbs/{bid}Delete a load balancerDeletes a load balancer. This is asynchronous and responds 202 Accepted.
Path parameters
| Name | Type | Description |
|---|---|---|
bid | integer | Load balancer ID |
Returns 202 Accepted with no body.
Flat GET and PATCH variants
GET /v1/net-lbs/{bid} and PATCH /v1/net-lbs/{bid} are Administrator mirrors of the workspace-scoped fetch and update endpoints. They accept the same parameters and return the same shapes. They also expose GET /v1/net-lbs/{bid}/instances, PUT /v1/net-lbs/{bid}/instances/{iid}, and DELETE /v1/net-lbs/{bid}/instances/{iid} without the workspace prefix.