Lux Docs
Iam

IAM API

REST API endpoints for user management, authentication, and authorization

All endpoints are served from https://hanzo.id/api/. Authentication required via Bearer token or session cookie.

Authentication

OAuth Token Exchange

POST /api/login/oauth/access_token

grant_type=authorization_code&code={code}&redirect_uri={uri}
&client_id={id}&client_secret={secret}

Refresh Token

POST /api/login/oauth/refresh_token

grant_type=refresh_token&refresh_token={token}&client_id={id}

OIDC Discovery

GET /.well-known/openid-configuration

User Management

EndpointMethodDescription
/api/get-accountGETCurrent user (requires auth)
/api/get-user?id={org}/{name}GETGet user by ID
/api/update-userPOSTUpdate user profile
/api/get-users?owner={org}GETList users in org

Organization Management

EndpointMethodDescription
/api/get-organizationsGETList organizations
/api/get-organization?id={name}GETGet organization

Application Management

EndpointMethodDescription
/api/get-applications?owner={org}GETList applications
/api/get-application?id={org}/{app}GETGet application

Roles and Permissions

EndpointMethodDescription
/api/get-roles?owner={org}GETList roles
/api/get-permissions?owner={org}GETList permissions

Assign roles by updating the user object:

{
  "owner": "org",
  "name": "username",
  "roles": [{"owner": "org", "name": "admin"}]
}

On this page