[ARCHIVED] Get all Course's IDs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey all,
I was looking at writing a program that would publish all my courses for me and I came upon several solutions. They all seems to go back to this one call.
Courses - Canvas LMS REST API Documentation
The problem is that it seems the id of the course is needed to make this call, an id generated by Canvas' SIS Learning Environment where I don't (yet) have any idea how to read the ID used for selective courses.
My workaround is to use the sis_course_id: tag as suggested here.
Object IDs, SIS IDs, and special IDs - Canvas LMS REST API Documentation
But is there a call you guys know that can retrieve all the courses' IDs from the system so we can run a system wide review? For example, courses that were created via the GUI... which wouldn't be tracked or predicted via external data sources?
Thanks in advance,
Sc.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't download the report if you want to get the list through the API. Yes, you can generate the report through the API, but it will be easier to fetch the list of IDs directly.
Use the List active courses in an account endpoint of the Accounts API. You will need to handle pagination because you'll have more courses than can be returned in a single call.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.