AnsweredAssumed Answered

Find a Course by SIS Course ID, when given only part of that SIS ID?

Question asked by Lee Newton on Dec 3, 2019
Latest reply on Dec 4, 2019 by Lee Newton

In my custom application, I have a program that successfully searches for and finds a course when given its SIS Course ID. Using this code written in PHP Laravel:

$sis_course_id = $request->sis_course_id; //gets the SIS Course ID
$courseURL = "$sis_course_id"; //parsed into a cURL request, gets the data from this endpoint with the matching SIS Course ID.

This code works perfectly if I have the precise SIS Course ID as saved in the Canvas endpoint. But it fails if I type in only part of that SIS Course ID, which is what I've been asked to do. Instead of the full course name (e.g "xxx-somePhraseWithNumbers11Here"), they want it possible to search with just a fraction of that (i.e the "somePhraseWithNumbers11Here" part, without the "xxx-" portion.


I've been reviewing the Canvas documentation on the courses endpoint once again, but if what I am looking to do is listed in there as a function, I seem to have overlooked it.


Is it possible to find a course given only part of its SIS ID? Any thoughts would be very useful