How to get all the courses from an university

Jump to solution
fpettigrosso
Community Novice

Hello,

I do not know if this possible or not, is there a way to get a list of all the courses in a university's canvas lms regardless if the user accessing the information is enrolled in the course or not either via the interface and/or api?  I just started to research this and I was wondering if anyone found a way or knows of a good place to start.

1 Solution

If your account that you applied for the admin token under is the account with the most privileges and you can see all the institutional courses while logged into the Canvas UI, then your $security_token variable should be okay.

As for the :account_id parameter that's the string of numbers that appears in the request URL after api/v1/accounts. From your code example it's a number 1.

What happens when you are logged in your account and use a web browser to view the API URL in your code example? You should see a string of JSON code equivalent to what your API call would return. 10 results is the default number of JSON objects that the API returns. You can change this by adding a per_page=n parameter to the request. If you're getting less than 10 results in the JSON string, that would indicate that you don't have the correct :account_id or admin credentials to see ALL the courses in your institution.

View solution in original post