Hanzo

Load-balancers

Regional/global load balancers

Regional/global load balancers

Base URLhttps://api.hanzo.ai
Operations4
AuthAuthorization: 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.

ParameterInTypeRequiredDescription
idpathstringyesDO 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.

ParameterInTypeRequiredDescription
idpathstringyesDO 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 bodyapplication/json (required)

FieldTypeRequiredDescription
forwarding_rulescloud_fwdRule[]ForwardingRules are the listen→backend port mappings.
namestringName is the FRIENDLY name, a DNS-safe slug of at most 40 characters.
regionstringRegion is the DigitalOcean region slug (nyc3, sfo3, …).
sizestringSize is the DigitalOcean size slug.
typestringType is the DigitalOcean load-balancer type.

All Hanzo APIs · Interactive reference

How is this guide?

On this page