REST API to retrieve user URL reference from userid
Is there a way to retrieve the URL identifier for a user by looking up their ID? I'm trying to assign a work item to a particular user when POSTing the work item to the work item factory using the 'rtc_cm:ownedBy' field. I know their ID but can't see a way to look up their internal URL. The post returns a 409: Conflict code and this is the line of code that causes it. I'm guessing that the cause is that it requires the actual user URL and not their simple id.
I used the following line of code to set the ownedBy value: NameValuePair wiOwner = new NameValuePair("rtc_cm:ownedBy","architect"); |
3 answers
Although not found by my initial simple scan, this appears to be answered by another recent post:
http://jazz.net/forums/viewtopic.php?t=6783 I would echo much of what Adrian said. The point of providing REST APIs is so that a client with relatively little knowledge can do something on the resources. Any resource that is referenced by an URL but known externally by some other key ought to be "lookup-able" by key to get the URL. This is true for most resources already. In the meantime, I'll try the email tag trick suggested by Patrick: <rtc_cm> |
Although not found by my initial simple scan, this appears to be The e-mail tag was a possible proposal for a future solution. It is not implemented. The link to get the user information using the email address works, however. If you are willing to do some path math and you have the userId, this works, too: https://localhost:9443/jazz/oslc/users/ -- Regards, Patrick Jazz Work Item Team |
Thanks Patrick,
I just discovered that it wasn't implemented yet and was about to post about that. I'll try one of your other suggested methods. -Sky
|
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.