It's all about the answers!

Ask a question

REST API: passing WI Id literal to WI Id number


Noel Gimeno (1521417) | asked Apr 12 '10, 12:43 p.m.
I am doing some scripts with the Web API and Curl, and this problem arised when I was trying to add a child link to a WI.

I found out there are two ways(at least) to identify a WI:
1-https://localhost:9443/jazz/oslc/workitems/232.xml
2-https://localhost:9443/jazz/resource/itemOid/com.ibm.team.workitem.WorkItem/_v_OOMEIkEd-LWZ-HXG-mhg

I have access to the first way, but when adding a child relationship, I need the WI in the second form.

Is there any way to transform from one to another?

One answer



permanent link
Patrick Streule (4.9k21) | answered Apr 13 '10, 6:25 a.m.
JAZZ DEVELOPER
I am doing some scripts with the Web API and Curl, and this problem
arised when I was trying to add a child link to a WI.

I found out there are two ways(at least) to identify a WI:
1-https://localhost:9443/jazz/oslc/workitems/232.xml
2-https://localhost:9443/jazz/resource/itemOid/com.ibm.team.workitem.WorkItem/_v_OOMEIkEd-LWZ-HXG-mhg

I have access to the first way, but when adding a child relationship,
I need the WI in the second form.

Is there any way to transform from one to another?

Usually, you would get the URL from a query. Either using the OSLC-CM
query syntax or the delegated picker UI. You shouldn't rely on a
specific URL pattern and assemble it yourself.

The change request representation also contains a canonical reference to
itself. E.g. the XML for .../jazz/oslc/workitems/232.xml contains:

<oslc_cm>
....

If really nothing else helps, you can also use this URL format:

https://localhost:9443/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/232

--
Regards,
Patrick
Jazz Work Item Team

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.