Hanzo

Vpcs

Virtual Private Cloud networks

Virtual Private Cloud networks

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

vpcs

GetVpc returns one of the caller org's VPCs by id.

GET /v1/vpcs/{id}

GetVpc 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
idpathstringyesDO VPC id

DeleteVpc removes one of the caller org's VPCs and answers 204.

DELETE /v1/vpcs/{id}

DeleteVpc 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
idpathstringyesDO VPC id

ListVpcs returns every VPC the caller's org owns, under the friendly names the org created them with.

GET /v1/vpcs

ListVpcs 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.

CreateVpc creates a VPC in the caller's org namespace and answers 201 with it.

POST /v1/vpcs

CreateVpc 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