Retrieve Users and Groups in optimal way

Hi there

I want to retrieve the list of users assigned to a specific Application, and the groups assigned to each user. Currently I have 3 REST calls:

  1. to retrieve the Application given the app name
  2. to retrieve the list of users for a given application
  3. for each user, to retrieve the list of assigned groups

I’m thinking on ways to make this more efficient. One idea would be to retrieve the groups within an application, and then for each group, to retrieve the list of users. Given there are more users than groups, this would result in less REST calls.

Anyone has other ideas? much appreciated!!

Yes, that would be more efficient when you have more users than groups, and eliminate finding each app by name first:

  1. Return a list of apps to get app ids with /api/v1/apps
  2. For each app id, retrieve application groups using /api/v1/apps/${applicationId}/groups
  3. Using the group id, retrieve the members of each groups with /api/v1/groups/${groupId}/users
3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.