List load balancer targets

List a load balancer's targets. A label_selector target shows as one entry, not one per matching server.

GET https://{availability_zone}.betterstackcloud.com/v1/load-balancers/{load_balancer_id}/targets
load_balancer_id string required

The ID of the load balancer.

Authorization string required

Bearer $TOKEN

200 OK
{
  "data": [
    {
      "id": 1,
      "type": "server",
      "server_id": "123456789",
      "selector": {
        "example": "value"
      },
      "use_private_ip": false,
      "created_at": "2026-07-01T12:00:00.000Z",
      "updated_at": "2026-07-01T12:00:00.000Z"
    }
  ]
}

Returns the list of load balancer targets.

id integer

The target's ID.

type string

What the target points at.
Valid values:
server: One server. Send server_id and leave out selector.
label_selector: Every server whose metadata matches selector. Send selector and leave out server_id.

server_id string or null

The ID of the server to send traffic to.

selector object or null

The tags a server must have to receive traffic, as string pairs. A server must have every pair.

use_private_ip boolean

Whether to send traffic to the servers' private IP on a network they share with the load balancer, instead of their public IP.

created_at datetime

When the target was added. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime

When the target was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.