-
Notifications
You must be signed in to change notification settings - Fork 49
updated the api contracts for users filters api #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
heyrandhir
commented
Apr 3, 2023
- Update api contracts for /users/filter.
- with this API Users can be filtered based on their skills and status i.e idle, active, or OOO.
sahsisunny
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| | [GET /users/:userId/badges](#get-usersidbadges) | Returns badges assigned to the user | | ||
| | [POST /users](#post-users) | Creates a new User | | ||
| | [PATCH /users/self](#patch-usersself) | Updates data of the User | | ||
| | [GET /users/filter](#get-usersfilter) | Returns user data based on a filter | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be ?filter. (Since filter is not a resource)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In another issue here, /users/userId is being modified to /users?userId=.. .As this change also accepts query parameters directly after /users. Adding query parameters here as well after /users will cause a collision.
can we rename this endpoint to /users/search?....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heyrandhir are we going with /users/filter or /users/search for this API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vikhyat187 as of now going with /users/search .also waiting for @ankushdharkar comment on this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just give the results based on the key provided in the query parameters?
If asked for the filter, we filter and give, if asked for ?userId, we give user details.