Register for InstructureCon25 • Passes include access to all sessions, the expo hall, entertainment and networking events, meals, and extraterrestrial encounters.
Found this content helpful? Log in or sign up to leave a like!
I have been attempting to retrieve a list of courses based on a set of a course names via the api method,
This method consistently resulted in an error and thus I reached out to Canvas support and they confirmed that indeed there is a bug and as of yet they do not have a timeline for a fix (see ticket #1564367).
Currently we a creating/provisioning courses by uploading a flat-file to the sis import endpoint. This method leaves our system with no knowledge of the Canvas' assigned course id for the created/provisioned courses. In order to update a course attributes in retrospect via the api method, update a course, one needs to know the course's Canvas assigned course id. Since I cant retrieve the Canvas course objects and thus obtain the Canvas course id via the api method, search/all_courses, due to the aforementioned bug I would like to know if there is another api method call or other automated way to retrieve Canvas course objects/ids based on a course name in a programmatic fashion?
Thank you for any suggestions and or help
Solved! Go to Solution.
Hi Rebecca,
If you're doing a SIS Import, your course has a required SIS ID for each course. You can use "sis_course_id:SIS ID" instead of the canvas-assigned internal ID to retrieve courses.
For example, our SIS ID format for courses is something like this: TST_100_001_U2015, and it's URL in Canvas may be
your_institution.instructure.com/courses/1527386
This is equivalent to saying
your_institution.instructure.com/courses/sis_course_id:TST_100_001_U2015
This works in API calls as well.
Not sure if this works for your situation, but we have not needed to store internal Canvas ID for our use at the institution. Also the internal Canvas ID changes when course gets reset, so you'd have to know to re-get the ID when that happens.
Hope this helps,
Kumi
Hi Rebecca,
If you're doing a SIS Import, your course has a required SIS ID for each course. You can use "sis_course_id:SIS ID" instead of the canvas-assigned internal ID to retrieve courses.
For example, our SIS ID format for courses is something like this: TST_100_001_U2015, and it's URL in Canvas may be
your_institution.instructure.com/courses/1527386
This is equivalent to saying
your_institution.instructure.com/courses/sis_course_id:TST_100_001_U2015
This works in API calls as well.
Not sure if this works for your situation, but we have not needed to store internal Canvas ID for our use at the institution. Also the internal Canvas ID changes when course gets reset, so you'd have to know to re-get the ID when that happens.
Hope this helps,
Kumi
Kumi,
Thank you very much. This is exactly what I was looking for and fits my needs perfectly.
I browsed through the api documentation and did not find where this method to retrieve a course object was defined. Do you know where in the api documentation a developer could have found this without your assistance? Or did you learn of this method through another individual as well?
Again, Thank you for providing me with this information.
Rebecca
Hi Rebecca,
Glad that helped!
I meant to include this link in my earlier reply and forgot.. it is documented here: Canvas LMS REST API Documentation
Kumi
Kumi,
Thank you again. You were a big help.
Rebecca
To interact with Panda Bot in the Instructure Community, you need to sign up or log in:
Sign In