Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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");

0 votes



3 answers

Permanent link
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>

0 votes


Permanent link
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


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

0 votes


Permanent link
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



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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,927

Question asked: Sep 18 '09, 10:13 a.m.

Question was seen: 5,485 times

Last updated: Sep 18 '09, 10:13 a.m.

Confirmation Cancel Confirm