Hanzo AI
OpenapiNetwork

Create identities

Puts the caller on the org's overlay as its own IAM subject.

POST /v1/network/identities

Addresshttps://api.hanzo.ai/v1/network/identities
MethodPOST
Operationpost_network_identities
AuthAuthorization: Bearer $HANZO_API_KEY

Puts the caller on the org's overlay as its own IAM subject.

The identity is the one whose externalId is the caller's sub, admitted by the controller's "iam" auth policy: the caller logs in to the fabric with its own IAM access token, and nothing is enrolled. It is named by the subject unless a name is given, and carries the org's "org-<org>" role attribute plus any supplied roles — each scoped to the org, and a "<service>-host" role refused unless the org has published that service.

IDEMPOTENT: a caller who already has an identity gets the same one back, with any of these roles it lacked added — which is how one person's identity comes to serve every org they act in.

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

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
namebodystringName is the identity's name within the org — a DNS label, stored on the fabric as "<name>.<org>". Absent, the identity is named by the caller's IAM subject.
rolesbodystring[]Roles are extra role attributes for the identity, each scoped to the caller's org on the way in ("k3s-host" is written as "k3s-host.<org>") so no caller can…

Response

StatusBodyMeaning
201network.identityViewcreated
defaultproblem-detailsrefused

201 body — 4 fields.

FieldInTypeAlwaysDescription
externalIdbodystringExternalID is the IAM subject the identity logs in as: the controller admits a bearer whose sub equals it.
idbodystringID is the identity's fabric id — the key DELETE addresses.
namebodystringName is the identity's name within the org.
rolesbodystring[]Roles are the identity's role attributes as the fabric holds them: the "org-<org>" of every org it was ensured in, plus any org-scoped roles.

Failure carries the platform error shape — see Errors.

Examples

hanzo network identities create

Network API · All Hanzo APIs · Interactive reference

How is this guide?

On this page