You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API contract update for the pagination method enhancement on the users state API (#176)
* add pagination on the users state API
* add: update the API contract for the pagination method on users state API
* add: update the API contract for the pagination method on users state API
* add: update the API contract for the pagination method on users state API
* add: update the API contract for the pagination method on users state API add more fields
* add: update the API contract for the pagination method on users state API add route on the table
* add: add users state and verified value
Copy file name to clipboardExpand all lines: users/README.md
+75-21Lines changed: 75 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ number and email address.
43
43
|[GET /users/userId/:userId](#get-usersuseriduserid)| Returns user with given userId |
44
44
|[GET /users/:username](#get-usersusername)| Returns user with given username |
45
45
|[GET /users/:userId/badges](#get-usersidbadges)| Returns badges assigned to the user |
46
+
|[GET /users/search](#get-users-search)| Returns users based on specified filters |
46
47
|[POST /users](#post-users)| Creates a new User |
47
48
|[PATCH /users/self](#patch-usersself)| Updates data of the User |
48
49
|[PATCH /users/:id/temporary/data](#patch-usersidroles)| Updates user roles |
@@ -55,36 +56,34 @@ Returns all users in the system.
55
56
-**Params**
56
57
None
57
58
-**Query**
58
-
- Optional: `size=[integer]` (`size` is number of users requested per page,
59
-
value ranges in between 1-100, and default value is 100)
60
-
- Optional: `page=[integer]`
61
-
(`page` can either be 0 or positive-number, and default value is 0)
59
+
- Optional: `size=[integer]` (`size` is the number of users requested per page, value ranges between 1-100, and the default value is 100)
60
+
- Optional: `page=[integer]` (`page` can either be 0 or a positive number, and the default value is 0)
62
61
- Optional: `search=[string]` (`search` is a string value for username prefix)
63
-
- Optional: `next=[string]` (`next` is id of the DB document to get next batch/page of results after that document.)
64
-
- Optional: `prev=[string]` (`prev` is id of the DB document to get previous batch/page of results before that document.)
65
-
- Optional: `query=[string]` (`query` can be used to filter and/or sort users based on their PR and Issue status within a given date range. [Learn more](https://github.com/Real-Dev-Squad/website-backend/wiki/Filter-and-sort-users-based-on-PRs-and-Issues) )
62
+
- Optional: `next=[string]` (`next` is the id of the DB document to get the next batch/page of results after that document.)
63
+
- Optional: `prev=[string]` (`prev` is the id of the DB document to get the previous batch/page of results before that document.)
64
+
- Optional: `query=[string]` (`query` can be used to filter and/or sort users based on their PR and Issue status within a given date range. [Learn more](https://github.com/Real-Dev-Squad/website-backend/wiki/Filter-and-sort-users-based-on-PRs-and-Issues) )
@@ -216,6 +215,61 @@ Returns badges assigned to the user
216
215
- **Content:**
217
216
`{ 'statusCode': 400, 'error': 'Bad Request', 'message': 'Failed to get user badges.' }`
218
217
218
+
## **GET /users/search**
219
+
220
+
Returns users based on the specified filters.
221
+
222
+
- **Params:**
223
+
None
224
+
225
+
- **Query Parameters:**
226
+
- Optional: `levelId=[string]` (Specifies the level ID)
227
+
- Optional: `levelName=[string]` (Specifies the level name)
228
+
- Optional: `levelValue=[number]` (Specifies the level value)
229
+
- Optional: `tagId=[string]` (Specifies the tag ID)
230
+
- Optional: `state=[string]` (Specifies the user state. Possible values: "ACTIVE", "OOO", "IDLE", "ONBOARDING", "ONBOARDING31DAYS". This parameter can be repeated for multiple states.)
231
+
- Optional: `role=[string]` (Specifies the user role, valid values are "MEMBER", "INDISCORD", "ARCHIVED")
232
+
- Optional: `verified=[string]` (Specifies if the user is verified. Possible values: "true", "false")
233
+
- Optional: `time=[string]` (Specifies the time filter, e.g., "31d")
0 commit comments