Users
The Flywheel SDK provides methods for managing user accounts on the site. Most user-management operations require admin permissions.
User model overview
A Flywheel user account has the following key fields:
| Field | Description |
|---|---|
id | The user's email address (used as the unique identifier) |
firstname | First name |
lastname | Last name |
email | Email address (same as id) |
roles | List of site-level role assignments |
avatar | URL of the user's avatar image |
Note
User IDs in Flywheel are email addresses. Pass the email address wherever a user_id parameter is required.
User provisioning
Users are typically provisioned via single sign-on (SSO) or Lightweight Directory Access Protocol (LDAP). The SDK supplements those mechanisms and is useful for scripted onboarding, bulk modifications, or querying user state. It is not a replacement for your organization's identity provider.
Getting the current user
Any authenticated user can retrieve their own account:
Listing all users
Listing all users requires admin permissions:
Getting a user by ID
Adding a user
Modifying a user
Deleting a user
Warning
Deleting a user removes their account from the site but does not remove their permission entries from groups and projects. Clean up their permissions separately if needed.