Users are identities that can log in and interact with Pangolin resources. Users (except Root) are scoped to a specific Tenant.
Base Endpoint: /api/v1/users
- Method:
GET - Path:
/api/v1/users - Auth: Tenant Admin Token (or Root with Tenant Context)
- Headers:
X-Pangolin-Tenant: <tenant-uuid>(if using Root token)
curl -X GET http://localhost:8080/api/v1/users \
-H "Authorization: Bearer <token>"- Method:
POST - Path:
/api/v1/users - Body:
{ "username": "alice", "email": "alice@example.com", "password": "password123", "role": "tenant-user", "tenant_id": "<optional-uuid>" }Note:
rolemust betenant-user,tenant-admin, orroot.
curl -X POST http://localhost:8080/api/v1/users \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"username": "alice", "email": "alice@ex.com", "password": "pw", "role": "tenant-user"}'Ensure you have selected a tenant first using pangolin-admin use <tenant>.
pangolin-admin list-users# Create a standard user
pangolin-admin create-user alice \
--email alice@example.com \
--role tenant-user \
--password "securePass123"
# Create a tenant admin
pangolin-admin create-user bob-admin \
--email bob@example.com \
--role tenant-adminpangolin-admin delete-user aliceusers = client.users.list()
for u in users:
print(u.username, u.role)# Create standard user
user = client.users.create(
username="alice",
email="alice@example.com",
role="tenant-user", # Case-sensitive: tenant-user or tenant-admin
password="password123"
)
print(f"Created user {user.id}")- Log in as a Tenant Admin (or Root switched to a tenant).
- Navigate to Users in the sidebar.
- List: You will see a table of users in the current tenant.
- Create: Click "Create User".
- Fill in Username, Email, Password.
- Select Role: Tenant User or Tenant Admin.
- Click Create.
- Manage: Click the "Edit" icon to update details or "Trash" icon to delete.