Hanzo
OpenapiIngress

Creates or replaces one routing rule and hot-applies the new table — there is… — POST /v1/ingress/routes

Creates or replaces one routing rule and hot-applies the new table — there is no config file and no restart.

POST /v1/ingress/routes

Addresshttps://api.hanzo.ai/v1/ingress/routes
MethodPOST
Operationpost_ingress_routes
AuthAuthorization: Bearer $HANZO_API_KEY

Creates or replaces one routing rule and hot-applies the new table — there is no config file and no restart. POST mints an id when the body omits one; PUT takes the id from the URL, which wins over any id in the body. A route's host is a GLOBALLY unique DNS claim: a host another org's route already holds is refused 409, so no tenant can hijack another's hostname.

Request

7 fields, body application/json (required).

FieldInTypeRequiredDescription
hostbodystringHost is the exact hostname this route matches, lowercased with any trailing dot stripped.
idbodystringID identifies the route within the org: [A-Za-z0-9-_.], at most 128 chars.
middlewaresbodystring[]Middlewares are the ids of the edge transforms to apply, in this order, before the request reaches the service.
pathPrefixbodystringPathPrefix narrows the match to requests under this path; it must start with "/".
prioritybodyintegerPriority orders routes that share a host: higher wins, and equal priorities fall back to the longer PathPrefix.
servicebodystringService is the id of the backend pool this route dispatches to.
tlsbodybooleanTLS asks the edge to terminate TLS for Host with an ACME-managed certificate.

Response

StatusBodyMeaning
200Routeok

200 body — 7 fields.

FieldInTypeAlwaysDescription
hostbodystringHost is the exact hostname this route matches, lowercased with any trailing dot stripped.
idbodystringID identifies the route within the org: [A-Za-z0-9-_.], at most 128 chars.
middlewaresbodystring[]Middlewares are the ids of the edge transforms to apply, in this order, before the request reaches the service.
pathPrefixbodystringPathPrefix narrows the match to requests under this path; it must start with "/".
prioritybodyintegerPriority orders routes that share a host: higher wins, and equal priorities fall back to the longer PathPrefix.
servicebodystringService is the id of the backend pool this route dispatches to.
tlsbodybooleanTLS asks the edge to terminate TLS for Host with an ACME-managed certificate.

Failure carries the platform error shape — see Errors.

Examples

hanzo ingress routes create

Ingress API · All Hanzo APIs · Interactive reference

How is this guide?

On this page