The Identity API exposes a single endpoint —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/yohangr3/agentelanggrafh/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/me — that returns everything the frontend needs to make conditional rendering decisions: the user’s effective role, every granted permission key, the list of data modules the agent may query on their behalf, labor-cost restrictions, and the set of tenant instances they can access.
Client-side gating based on this response is for UX only. Every action is independently enforced server-side. Never use
GET /api/me as a security gate in client code.Authentication
GET /api/me
Returns the calling user’s resolvedPrincipal as a public dictionary. The same shape is embedded in every agent graph state object, so the agent nodes always operate with an up-to-date copy of the caller’s access.
Response — MeResponse
Cognito subject (
sub) — the stable UUID that uniquely identifies the user across all systems. Use this as the canonical user key in DynamoDB records.Display username. In most deployments this is the user’s email address.
User’s email address.
Tenant identifier assigned to this user (
custom:tenantId). Determines which deployment instance the user’s data queries are routed to. Defaults to "default" if unset.The user’s effective role name, resolved from their Cognito group membership.
| Value | Description |
|---|---|
platform_admin | Vendor staff — cross-tenant operations, full access to all instances. |
org_admin | Organization administrator — manages users and roles within their tenant. |
finance_lead | Finance lead analyst — full read access plus data export. |
analyst | Standard analyst — chat queries, visualisations, SQL view. |
viewer | Read-only — chat queries only, no SQL or export access. |
Sorted list of atomic permission keys granted to this user. The full set of possible values is listed below.
Sorted list of data module slugs the agent is allowed to query for this user. The effective set is computed as
(role_base ∪ modules_added) − modules_removed from DynamoDB overrides.true when the user has the costos module but not the nomina add-on. When true, the schema linker and SQL validator hide all Costos Mano de Obra account lines from generated queries and responses.true only on the primary instance (where expected_tenant == "*"). The frontend uses this flag to show or hide the admin panel navigation link. The admin plane does not exist on tenant-specific deployments — see dev-log/037.Additional instance slugs the user is authorised to access beyond their home tenant (
custom:tenants). A platform_admin can access all instances regardless of this list.Example
GET /api/admin/roles
Returns the full role catalog, including pre-designed inactive roles. Requiresadmin.users.read permission.
Response — RoleCatalogResponse
List of role definitions, sorted by
rank descending (highest authority first).Sorted list of every permission key defined in the system, regardless of role assignment.
Sorted list of every module slug defined in the system.
Error Reference
| Status | Condition |
|---|---|
401 Unauthorized | Missing or expired JWT. |
403 Forbidden | Valid JWT but insufficient permissions (e.g. calling /api/admin/roles without admin.users.read). |
429 Too Many Requests | Rate limit exceeded. |