I'm creating a custom web application for my university that allows users to search for a single user in Canvas.
I've studied the documentation here: https://canvas.instructure.com/doc/api/users.html#method.users.api_index
From what I understand, I can get a single user if I have their ID. "GET /api/v1/users/:id"
However, in building my page, I am thinking of users who may not have the ID of the person they are thinking of: who may only have their name.
I am aware that the base Canvas site has this functionality. How do I use the People page in an account? However, I am creating a custom page, that is its own application yet uses Canvas endpoints to use its data. Hence I need this new app to have this functionality.
I imagine I can search my entire directory of users until I find one with a matching name, but I also fear that'd have an incredibly heavy load.
Is there any other method I can use to find just one user?
Solved! Go to Solution.
Brian, I had misunderstood that aspect while reading, it seems. That helps me noticeably, thank you. I'm able to simply call "https://my.test.instructure.com/api/v1/accounts/self/users?search_term=FirstName+Surname" and find a specific user that way.