The following API query used to work:
"GET", "https://canvas.instructure.com/api/v1/courses/<course_id>/search_users?search_term=" & uid, False
uid is our university id, which matches up with the sis_user_id in the canvas user record. So it seems that looking up users by using sis_user_id as the search_term no longer works, but I do not see any entries in the canvas API change log that seems to correspond to this change.
If I replace the uid field with the canvas user id, the lookup works. However we do not store the canvas user id in our system.
I just tested the endpoint and it works for me
/api/v1/courses/(course id)/search_users?search_term=(sis id)
Noticed that you're sending the request to /courses which limit your search to only that particular course, thus if the student didn't exist you will get a blank reply 
OK, I determined the cause of the problem. It seems that the sis_user_id fields in the canvas database are now inconsistent. Sometimes I see the the uid (unviersity id) which is what is expected and allows for lookup to work correctly, and other times I see something in this format:
For those records where the uid is stored in the sis_user_id field, lookup works correctly. But in the case of the above format, lookup fails.
Any idea where these sis_user_id values with "UID" string prepended came from? Our actual uids are between 8-10 digits and no characters prepended.
Thanks in advance.
Thanks for the feedback! However I do not believe this is coming from our Student Information System. Looking at the canvas user records again, what appears to be happening is that the sis_user_id is being replaced by the login_id field. But it is happening only for some of the user records, and other user records are retaining the expected value for the sis_user_id (our 8-10 digit university ID). See the bold values here:
Does anyone have any idea why the login_id is overwriting the sis_user_id field for some of our user records?
Just a quick update - the SIS IDs are inconsistent in the Course Roster as well. Please see above image.
To revise my previous post, it looks like the 7-digit values are in fact coming from our Student Information System. There is apparently a dual ID system at our institution. However it is not clear why some of the Canvas user records have been updated in this way and others were unaffected.
Any suggestions would be helpful.
Login ID (or pseudonym[unique_id] as referred by Canvas API) is a required field when creating a user on Canvas via API (which is how your SIS communicate with Canvas), you can have a look at this API endpoint here https://canvas.instructure.com/doc/api/users.html#method.users.create
While SIS ID (or pseudonym[sis_user_id]) is optional and it can be anything or blank.
From the image provided, I would assume that if you didn't provide a University ID (10-digit in your case) to your SIS, it will simply append "UID: + LoginID" to SIS ID field on Canvas.