Getting the roles available in a course?

matthew_buckett
Community Contributor

Is there a way of getting the roles available in a course? I don't need all the permissions that each role has, just the roles that are available. You can a list of roles for an account, but most of our users in a course don't have access the account that contains the course and so can't use the account API endpoint (https://canvas.instructure.com/doc/api/roles.html#method.role_overrides.api_index).

What I'm wanting to build is something similar to the roles dropdown that is presented when adding people to a course:

Screenshot 2021-07-01 at 15.34.22.png

Labels (1)