Hanzo

Vpcs

Package do is the org-scoped private-network surface — /v1/vpcs and /v1/balancers — carved out of Hanzo's OWN house DigitalOcean account.

Package do is the org-scoped private-network surface — /v1/vpcs and /v1/balancers — carved out of Hanzo's OWN house DigitalOcean account.

Base URLhttps://api.hanzo.ai
Operations4
AuthAuthorization: Bearer $HANZO_API_KEY

vpcs

GET /v1/vpcs/{id}

Returns one of the caller org's VPCs by id. A VPC that exists but sits in another org's namespace is reported 404, never 403 — the answer must not tell one tenant that another tenant's resource exists.

ParameterInTypeRequiredDescription
idpathstringyesID is the DigitalOcean resource id (a UUID), from the path.

DELETE /v1/vpcs/{id}

Removes one of the caller org's VPCs and answers 204. Ownership is confirmed by re-fetching the resource and checking its physical name carries the caller's org prefix BEFORE anything is deleted, so a cross-tenant id is a 404 rather than a delete of another org's VPC.

ParameterInTypeRequiredDescription
idpathstringyesID is the DigitalOcean resource id (a UUID), from the path.

GET /v1/vpcs

Returns every VPC the caller's org owns, under the friendly names the org created them with. DigitalOcean is one account for the whole deployment, so the account-wide inventory is filtered to the caller's own "o"<orgHash>- name prefix and the prefix is stripped — another org's VPC is not merely hidden, it is never in the answer.

POST /v1/vpcs

Creates a VPC in the caller's org namespace and answers 201 with it. The physical DigitalOcean name is derived server-side from the validated org, so a tenant can only ever create inside its own namespace; a name that already exists there is a 409.

Request bodyapplication/json (required)

FieldTypeRequiredDescription
ip_rangestringIPRange is the VPC's private CIDR.
namestringName is the FRIENDLY name, a DNS-safe slug of at most 40 characters.
regionstringRegion is the DigitalOcean region slug (nyc3, sfo3, …).

All Hanzo APIs · Interactive reference

How is this guide?

On this page