Skip to content
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

added query params for role for users API #117

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion users/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ Returns all users in the system.
- **Query**
Optional: `size=[integer]` (`size` is number of users requested per page,
value ranges in between 1-100, and default value is 100) <br> Optional: `page=[integer]`
(`page` can either be 0 or positive-number, and default value is 0) <br> `search=[string]` (`search` is a string value for username prefix) <br> Optional: `next=[string]` (`next` is id of the DB document to get next batch/page of results after that document.) <br> Optional: `prev=[string]` (`prev` is id of the DB document to get previous batch/page of results before that document.)
(`page` can either be 0 or positive-number, and default value is 0) <br> `search=[string]` (`search` is a string value for username prefix) <br> Optional: `next=[string]` (`next` is id of the DB document to get next batch/page of results after that document.) <br> Optional: `prev=[string]` (`prev` is id of the DB document to get previous batch/page of results before that document.)<br>
Optional: `role=[string]`(`role` will filter out the users with the role that is provided in the query params, e.g, if we give `?role=member` then it will return all the users with the role `member`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add all the roles we will allow for the filter?

And I think we should maintain an enum for all roles, What do you think?

- **Body**
None
- **Headers**
Expand Down