I think it would be a good idea to have a centralised search endpoint as it would be nice to provide a consistent search across the entire db across all entities...
If the teamId* route param is empty, search would look through the entire db
If a teamId(s) is specified here it could be referenced by path (which we return on teams endpoints) e.g.
/authorization/search/team1/team1-1
With no params set, it might return the teams entities (as per the team call) and so we could traverse the system with nice RESTful routing.
If search params are specified then it would search for children of the team specified only
i.e. look for sub teams, users and policies, depending on flags
would would return all users in team1-1 with names starting with the letter b ordered alphabetically, which would be useful for an autocomplete component on a UI
I think it would be a good idea to have a centralised search endpoint as it would be nice to provide a consistent search across the entire db across all entities...
Here's a suggestion as to how it might be defined
If the teamId* route param is empty, search would look through the entire db
If a teamId(s) is specified here it could be referenced by path (which we return on teams endpoints) e.g.
With no params set, it might return the teams entities (as per the team call) and so we could traverse the system with nice RESTful routing.
If search params are specified then it would search for children of the team specified only i.e. look for sub teams, users and policies, depending on flags
E.g.
would would return all users in team1-1 with names starting with the letter b ordered alphabetically, which would be useful for an autocomplete component on a UI