cancel
Showing results for 
Search instead for 
Did you mean: 
themidiman
Community Champion

Live API User Profile - Remove Title

Jump to solution

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. 

Labels (5)
0 Kudos
1 Solution

Accepted Solutions
James
Community Champion

@themidiman 

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.

View solution in original post

2 Replies
James
Community Champion

@themidiman 

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.

View solution in original post

themidiman
Community Champion

Thanks @James 

I have no problem doing one-off removal of title support calls, but I would venture to say that most of my cohorts in our district faculty support team are accustomed to finding things available to change via a web browser which is why I would have hoped the Live API would be a quick solution.

I'm just confirming that the Live API page behavior seems to be designed with the intent of not accepting empty strings in the user interface, and I suppose it would make sense if someone wanted to change just one thing in the user profile...you wouldn't want it to blank everything else out.