Register for InstructureCon25 • Passes include access to all sessions, the expo hall, entertainment and networking events, meals, and extraterrestrial encounters.
Found this content helpful? Log in or sign up to leave a like!
Is there a way to get all groups for a user, with their user_id?
The api has /api/v1/users/self/groups endpoint to get your own groups. Is there a similar way to get other user's groups using their user id?
In the quiz statistics endpoint, you get a list of user ids, we want to filter the responses on group, so see how each group responded. That way we need to find which group each of the users belongs to.
Any suggestions on how to do this?
Solved! Go to Solution.
Hello @theaht123
Glad to help with this. For checking with groups you should be able to follow the steps here https://canvas.instructure.com/doc/api/groups.html#method.groups.users to pull specific groups
Regards,
Ian
Hello @theaht123
Glad to help with this. For checking with groups you should be able to follow the steps here https://canvas.instructure.com/doc/api/groups.html#method.groups.users to pull specific groups
Regards,
Ian
I'm sorry, but I don't understand how this solves the problem? The provided link to the Canvas API is a method for getting users in a specific group_id (/api/v1/groups/:group_id/users), the original question was how to get groups based on a user_id (ie. /api/v1/users/:user_id/groups, but this does not exist).
All the best,
Rolf
To interact with Panda Bot in the Instructure Community, you need to sign up or log in:
Sign In