Hanzo AI
OpenapiNetwork

Create services

Puts a name on the org's overlay: a fabric service forwarding to host:port on whichever of the org's devices carries the "<name>-host" role, dialable at…

POST /v1/network/services

Addresshttps://api.hanzo.ai/v1/network/services
MethodPOST
Operationpost_network_services
AuthAuthorization: Bearer $HANZO_API_KEY

Puts a name on the org's overlay: a fabric service forwarding to host:port on whichever of the org's devices carries the "<name>-host" role, dialable at "<name>.<org>.zt" by any of the org's identities — and by the cloud's own, which is what lets a BYO cluster's apiserver be attached to the fleet with a ".zt" kubeconfig.

Answers 201 with the service and its DNS name. The objects behind it are created in dependency order and unwound on failure, so a half-published service never lingers on the fabric.

A write, so it does not degrade: an unconfigured deployment answers 503.

Request

3 fields, body application/json (required).

FieldInTypeRequiredDescription
hostbodystringHost is where the HOSTING identity forwards a connection — an address the host device itself can reach, "127.0.0.1" for a server on the device.
namebodystringName is the service's name within the org — a DNS label.
portbodyinteger (int64)Port is the port beside Host, and the one the DNS name intercepts.

Response

StatusBodyMeaning
201network.publishedViewcreated
defaultproblem-detailsrefused

201 body — 3 fields.

FieldInTypeAlwaysDescription
dnsbodystringDNS is the name the fabric answers for this service — what a kubeconfig server, or any client on the org's overlay, dials.
idbodystringID is the fabric service's id.
namebodystringName is the service's name within the org.

Failure carries the platform error shape — see Errors.

Examples

hanzo network services create

Network API · All Hanzo APIs · Interactive reference

How is this guide?

On this page