briancostea
14 years agoContributor
Is there a REST call to retrive the current user?
Hi,
I am new to Lithium so please be kind. I just looked through the javascript examples in the restapidocs_11.9 zip file that I downloaded. Am I missing something, or is there a REST call to retrive the current user?
Thanks
Brian
Welcome Brian!
There isn't a REST call to get the current user but there is a freemarker context object. Check this out for a list of all the nice things you can know about the current user:
You can use these variables to create your rest calls. For example, if you wanted to get the current user's avatar you would make a call like this:
/restapi/vc/users/id/${user.id}/profiles/avatar