Load-balancers
Regional/global load balancers
Regional/global load balancers
| Base URL | https://api.hanzo.ai |
| Operations | 4 |
| Auth | Authorization: Bearer $HANZO_API_KEY |
load-balancers
GetLoadBalancer returns one of the caller org's load balancers by id.
GET /v1/load-balancers/{id}
GetLoadBalancer returns one of the caller org's load balancers by id. One that exists in another org's namespace is reported 404, never 403 — the same existence-oracle guard the VPC read applies.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | DO load balancer id |
DeleteLoadBalancer removes one of the caller org's load balancers and answers 204.
DELETE /v1/load-balancers/{id}
DeleteLoadBalancer removes one of the caller org's load balancers and answers 204. Ownership is confirmed by re-fetching the resource before anything is deleted, so a cross-tenant id is a 404 rather than a delete of another org's load balancer.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | DO load balancer id |
ListLoadBalancers returns every load balancer the caller's org owns, under the friendly names the org created them with.
GET /v1/load-balancers
ListLoadBalancers returns every load balancer the caller's org owns, under the friendly names the org created them with. Same account-wide filter as the VPC listing: a load balancer outside the caller's "o"<orgHash>- namespace is never in the answer.
CreateLoadBalancer creates a load balancer in the caller's org namespace and answers 201 with it.
POST /v1/load-balancers
CreateLoadBalancer creates a load balancer in the caller's org namespace and answers 201 with it. The physical DigitalOcean name is derived server-side from the validated org; a name that already exists there is a 409. Omitting forwarding rules yields a usable HTTP 80→80 load balancer rather than a 422.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
forwarding_rules | cloud_fwdRule[] | — | ForwardingRules are the listen→backend port mappings. |
name | string | — | Name is the FRIENDLY name, a DNS-safe slug of at most 40 characters. |
region | string | — | Region is the DigitalOcean region slug (nyc3, sfo3, …). |
size | string | — | Size is the DigitalOcean size slug. |
type | string | — | Type is the DigitalOcean load-balancer type. |
How is this guide?