whoami
The namespace, space and permissions the credential carries — the cheapest round trip that proves a key.
whoami() -> WhoamiReturns
FieldTypePresence
namespacestringalwaysThe namespace the credential belongs to. It comes from the key — you cannot select it per request on this tier.
space_idstringalwaysThe space the key reads and writes.
permissionsPermissionsalwayscanEncode, canRecall, canPlan, canReason, canForget, canAdmin — booleans. Check them before offering an action rather than discovering the refusal at call time.
Example
me = brain.whoami()
if not me.permissions.can_forget:
hide_delete_button()The wire tier answers this without a round trip
A wire client already knows: the handshake returns the namespace, the bound
space and the permissions, and the client exposes them as connection
properties. There is no wire whoami because there is nothing to ask.
See also
Was this page helpful?