Canvas LMS REST API: get groups for user_id

Jump to solution
theaht123
Community Explorer

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?

Labels (1)
0 Likes
1 Solution
igustafson
Instructure
Instructure

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

 

View solution in original post