Live API User Profile - Remove Title
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Our institution has disabled changing the user profile via the Canvas UI. As a result our faculty can no longer change their titles when a change is needed.
I've been using the Live API to show our faculty admin group how to set a new Title, but so far cannot figure out how to use it to remove the title altogether. Leaving the user[title] parameter blank or with a space character doesn't do it. I'm assuming it's because that the form input in the live API application page sanitizes the inputs.
I can get Postman to send user[title]="" in the PUT request and that removes it. Is there any way to do this with the Live API? I would rather not have to support teaching people about how to use the Postman client.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thinking about how infrequently people would need to remove their title completely, if you have admin rights, it might be quicker for you to remove it for them through PostMan. An alternative is to set it to something innocuous like "human" or dot, comma, or dash.
The Live API interface does not send the field if there is no printable character in it. I tried a non-breaking space and it was stripped out as well.
There is a way to do it through the Live API, but it's a hassle, which is why I suggest you help people who need it removed completely. If I open the developer tools in the browser and go to the network tab and set it to Fetch/XHR, then I can send the request through the Live API. I then right click on the request and copy as fetch. I paste that into the console and edit it to remove the title so it just says "user[title]=" (essentially a null title). Then I can press enter to execute it. If you think teaching them how to use Postman is going to be difficult, then I wouldn't recommend this approach either. That's why I said it might be easier for someone with admin rights to change it for them.