Canvas API - what does tis do? /api/v1/accounts/:account_id/groups

Jump to solution
mweilan
Community Participant

Can someone tell me what this GET call is supposed to do?

/api/v1/accounts/:account_id/groups

I need a list of courses that are using Groups in my sub-account. Thank you.

0 Likes
1 Solution
chriscas
Community Coach
Community Coach

Hi @mweilan,

That particular API call would list account groups visible to the user associated with the API token used for the call.  Since you mentioned your looking at course groups, you'd need to use /api/v1/courses/:course_id/groups to see if there are groups associated with a particular course.  If you want to find which courses have groups, you'd need to so a bit of programming to first get a list of all of your courses (/api/v1/accounts/:account_id/courses) then loop through each course to check if it has groups.

Alternatively (and perhaps more easily), you should be able to use the provisioning report, found in account reports, and by selecting all terms and checking the groups csv option, you'll get back a CSV file with a list of all groups for that account.

Hope this helps a bit!  Let us know if you need more info on this topic.

-Chris

View solution in original post