Can I get the username or ID of the currently logged in user using the REST API?
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
Ian Barnard (2.3k●7●14)
| 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
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.