Get list of users with pagination
User Administration
List Users
Admin-only endpoint to retrieve a list of users. - If both start and end are 0, all users are returned. - Otherwise, returns users between the given start and end indexes (zero-based).
GET
Get list of users with pagination
Admin-only endpoint to retrieve a list of users with pagination support.
Request
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| start | integer | Yes | Starting index (0 for beginning) |
| end | integer | Yes | Ending index (0 to return all users) |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| departmentFilter | string | No | Department ID to filter users by |
departmentFilter Details
- Must be a valid MongoDB ObjectId of a department
- Can be
nullto return all users that are not part of any department - Example:
"64ef3c29f9a1c27e1b2c3a4d"
Response
200 OK - Successfully retrieved user list
401 Unauthorized
500 Internal Server Error
Examples
Get first 10 users
Get all users
Get users from specific department
Get users without department
Notes
- This is an admin-only endpoint - requires administrative privileges
- Pagination is zero-based (start at 0)
- Setting both start and end to 0 returns all users
- The response includes a total count for pagination controls
- Users are returned with summary information, not full profile data
- Use departmentFilter to narrow down results by department
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Starting index (0 for beginning)
Required range:
x >= 0Ending index (0 to return all users)
Required range:
x >= 0Query Parameters
Department ID to filter users by. - Must be a valid MongoDB ObjectId of a department. - Can be null to return all users that is not a part of any department.