It's all about the answers!

Ask a question

Can I get the username or ID of the currently logged in user using the REST API?


Mitch Slater (156) | asked Jun 28 '22, 6:37 p.m.

I'm trying to create a custom widget to produce a sorted version of 'My Tasks', but in order to get additional information, like work item dates, I need to get the current users ID or username. Is there any way to do from the client side that through the RQM (ETM) REST API using plain JavaScript? The only implementation's I've seen have either been using the Java Client or the Dojo package (using something like dojo.require("com.ibm.team.repository.web.client.session.Session"); ), neither of which I have access to. I am aware that I can get a list of tasks, but the objects returned don't have all the data that I would like to have. Thanks in advance!


Accepted answer


permanent link
Ian Barnard (2.3k714) | answered Jun 29 '22, 9:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 Hi Mitch I think you can go to https://SERVER:PORT/qm/whoami to get your server use id. Same for the other apps using their context root.

Mitch Slater selected this answer as the correct answer

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.