Hanzo
OpenapiLink

Shows one machine: its accounts, usage and live sessions.

Shows one machine: its accounts, usage and live sessions.

GET /v1/link/devices/{machine}

Addresshttps://api.hanzo.ai/v1/link/devices/{machine}
MethodGET
Operationget_link_devices_by_machine
AuthAuthorization: Bearer $HANZO_API_KEY

Shows one machine: its accounts, usage and live sessions.

It answers one device — its host and OS labels, every account the caller has signed in on that machine with its latest usage, and how many agent sessions the caller currently has running on it. The device labels come from the most-recently-seen account, since a device is a projection of its links rather than a row of its own. A machine with none of the caller's accounts is 404, which is also the answer when the machine belongs to someone else — the scope makes the two indistinguishable, deliberately. The session count reports 0 where the agent plane is not mounted rather than failing the read.

Request

1 field.

FieldInTypeRequiredDescription
machinepathstringyesMachine is the machine to act on, from the path.

Response

StatusBodyMeaning
200deviceViewok

200 body — 21 fields.

FieldInTypeAlwaysDescription
accountsbodylinkView[]Accounts is every account the caller has signed in on this machine.
accounts[].accountbodystringAccount is the provider-side account identifier, when the collector knows it.
accounts[].billingbodystringBilling is how this account's inference bills — plan (the user's own subscription, metered here for visibility only) or commerce (the gateway path).
accounts[].createdAtbodystringCreatedAt is when the link was first registered, RFC 3339 UTC.
accounts[].hostbodystringHost is the machine's human hostname label, from its most recent report.
accounts[].idbodystringID is the link's opaque handle ("link_" + 32 hex chars).
accounts[].kindbodystringKind is how the account authenticates: subscription or apikey.
accounts[].lastSeenbodystringLastSeen is when the account last reported, RFC 3339 UTC.
accounts[].machinebodystringMachine is the stable machine identifier the collector reports.
accounts[].osbodystringOS is the machine's operating system label.
accounts[].planbodystringPlan is the provider plan label (e.g.
accounts[].providerbodystringProvider is the AI provider this account belongs to (claude, openai, hanzo…).
accounts[].statusbodystringStatus is linked or revoked.
accounts[].updatedAtbodystringUpdatedAt is when the link was last refreshed, RFC 3339 UTC.
accounts[].usagebodyanyUsage is the last good usage snapshot, clamped and re-serialized to known fields at ingest.
accounts[].userbodystringUser is the owning subject — the validated caller who registered the link.
activeSessionsbodyintegerActiveSessions is how many agent sessions the caller currently has running on this machine; 0 where the agent plane is not mounted.
hostbodystringHost is the machine's hostname label, from its most-recently-seen account.
lastSeenbodystringLastSeen is when any account on this machine last reported, RFC 3339 UTC.
machinebodystringMachine is the stable machine identifier.
osbodystringOS is the machine's operating system label.

Failure carries the platform error shape — see Errors.

Examples

hanzo links devices get <machine>

Link API · All Hanzo APIs · Interactive reference

How is this guide?

On this page