Skip to main content
GET
Get list of users with pagination
Admin-only endpoint to retrieve a list of users with pagination support.

Request

Headers

Path Parameters

Query Parameters

departmentFilter Details

  • Must be a valid MongoDB ObjectId of a department
  • Can be null to 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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

start
integer
required

Starting index (0 for beginning)

Required range: x >= 0
end
integer
required

Ending index (0 to return all users)

Required range: x >= 0

Query Parameters

departmentFilter
string | null

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.

Response

Successfully retrieved user list

message
string
data
object