@@ -43,6 +43,7 @@ number and email address.
43
43
| [ GET /users/: userId /badges] ( #get-usersidbadges ) | Returns badges assigned to the user |
44
44
| [ POST /users] ( #post-users ) | Creates a new User |
45
45
| [ PATCH /users/self] ( #patch-usersself ) | Updates data of the User |
46
+ | [ GET /users/filter] ( #get-usersfilter ) | Returns user data based on a filter |
46
47
47
48
## ** GET /users**
48
49
@@ -260,3 +261,48 @@ Updates data of the User.
260
261
- ** Code:** 503
261
262
- ** Content:**
262
263
` { 'statusCode': 503, 'error': 'Service Unavailable', 'message': 'Something went wrong please contact admin' } `
264
+
265
+ ## ** GET /users/filter**
266
+
267
+ Returns users in the system based on the specified filters.
268
+
269
+ - ** Params**
270
+ None
271
+ - ** Query**
272
+ Required: filterParams=[ object] (filterParams is an object containing the filter criteria) <br >
273
+ Optional:
274
+ ` levelId=[string] ` (an array of level IDs to filter users by) <br >
275
+ Optional:
276
+ ` levelNumber=[number] ` (an array of level names to filter users by.) <br >
277
+ Optional:
278
+ ` levelName=[string] ` (an array of level names to filter users by.) <br >
279
+ Optional:
280
+ ` tagId=[string] ` (an array of tag IDs / Skill Ids to filter users by.) <br >
281
+ Optional:
282
+ ` state=[string] ` (an array of user states to filter users by i.e OOO, IDLE, ACTIVE ) <br >
283
+ - ** Body**
284
+ None
285
+ - ** Headers**
286
+ Content-Type: application/json
287
+ - ** Cookie**
288
+ rds-session: ` <JWT> `
289
+ - ** Success Response:**
290
+ - ** Code:** 200
291
+ - ** Content:**
292
+
293
+ ```
294
+ {
295
+ message: 'Users returned successfully!'
296
+ users: [
297
+ {<user_object>}
298
+ ]
299
+ count: 'number'
300
+ }
301
+ ```
302
+
303
+ - ** Error Response:**
304
+ - ** Code:** 401
305
+ - ** Content:**
306
+ ` { 'statusCode': 401, 'error': 'Unauthorized', 'message': 'Unauthenticated User' } `
307
+ - ** Code:** 500
308
+ - ** Content:** ` { 'statusCode': 500, 'error': 'Internal Server Error', 'message': 'Something went wrong please contact admin.' } `
0 commit comments