SuperAI Flow Platform

Sections

Theme switcher

List all users

Retrieve all users across all organizations with organization names.

This endpoint returns a complete list of users from all organizations in the platform, including each user's organization name. Use this for global user management, cross-organization reporting, and admin dashboards.

Context: - Returns users from ALL organizations (platform-wide view) - Includes organization name for each user - Users ordered by creation date (newest first) - No filtering by organization (use organization-specific endpoint for that) - ⚠️ PAGINATION NOT IMPLEMENTED - loads all users in memory - For production with many users, pagination should be added (see TODOs.md) Behavior: 1. Queries all users from database 2. Joins with organization table to include organization_name 3. Orders results by created_at descending 4. Returns complete user list with organization details Performance Warning: - ⚠️ Current implementation loads ALL users in memory - May cause timeouts with > 10,000 users - May cause high memory usage on server - Pagination implementation planned (see docs/api/TODOs.md) - For production, use organization-specific user list endpoints when possible

Use Cases: - Global admin dashboard showing all platform users - User search across all organizations - Platform-wide user analytics and reporting - Compliance audits requiring full user list - Export all users for backup or migration

Recommended Alternative for Large Datasets: For organizations with many users, use: GET /admin/organizations/{id}/users (filters to single organization)

Related Endpoints: - GET /admin/organizations/{id}/users - List users for specific organization (preferred) - POST /admin/users - Create user across organizations - GET /admin/users/{user_id} - Get individual user details - GET /admin/users/by-name/{name} - Search user by name

Future Improvement: Pagination will be added in future release. See docs/api/TODOs.md for details.

Header Parameters

Authorizationstring

Response

200
Object
List of all users across all organizations retrieved successfully

Response Attributes

created_atstring Required

Timestamp when user was created (ISO 8601 UTC).

emailstring Required

User's email address. Unique within organization. Used for login and notifications.

first_namestring Required

User's first name. Used in UI displays and emails.

idstring Required

Unique identifier for the user. Format: UUID v4

last_namestring Required

User's last name. Used in UI displays and emails.

modified_bystring Required

Identifier of the user or system that last modified this user. Used for audit trail.

organization_idstring Required

UUID of the organization this user belongs to.

organization_namestring Required

Display name of the user's organization. Included for convenience to avoid additional API calls. Useful in user lists and dashboards showing cross-organization data.

rolestring Required

User's role within the organization. Values: 'org_admin', 'backoffice', 'app_user', 'integration'

statusstring Required

User's account status. Values: 'active', 'inactive'. 'active' users can log in; 'inactive' users cannot.

updated_atstring Required

Timestamp when user was last modified (ISO 8601 UTC).

403
Object
Forbidden - Insufficient permissions to access this resource

Response Attributes

errorobject Required

Standard error detail structure.

This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.

Show child attributes

request_idnull
500
Object
Internal Server Error - An unexpected error occurred

Response Attributes

errorobject Required

Standard error detail structure.

This model matches the error format returned by the centralized exception handlers in app/api/errors/handlers.py.

Show child attributes

request_idnull
Was this section helpful?

What made this section unhelpful for you?

GET

/

Select
1

Response

Was this section helpful?

What made this section unhelpful for you?

View as Markdown

Ask an AI

Open in ChatGPTOpen in ClaudeOpen in Perplexity

Code with AI

Open in Copilot