It's all about the answers!

Ask a question

rtc sdk


Binoy D'costa (9532737) | asked May 24 '12, 5:42 p.m.
retagged Jun 13 '12, 11:11 a.m. by Evan Hughes (2.4k1318)
Hi,

I tried to follow below part in the RTC sdk, but it doesn't return "OwnedBy" and "type" attribute value. It returns only the id and title. What am I doing wrong?

In RTC SDK:

Get a work item with only the summary, the id, the type (inlined with all its properties) and the owner (name inlined):

https://localhost:9443/jazz/oslc/workitems/821.json?oslc_cm.properties=dc:identifier,dc:title,dc:type{*},rtc_cm:ownedBy{dc:title}


I'm using curl with basic authentication.

curl -s -D - -k -b ~/.jazzcookies -o $workitem.json -H "Accept: application/x-oslc-cm-changerequest+json" https://localhost:9443/jazz/oslc/workitems/23352.json?oslc_cm.properties=dc:identifier,dc:title,dc:type{*},rtc_cm:ownedBy{dc:title}


Thanks,
Binoy

One answer



permanent link
Daniel Pool (2644) | answered Jun 12 '12, 7:05 p.m.
JAZZ DEVELOPER

Binoy,

If you do a simple get using the browser, or using something like poster for firefox, what results do you see? I get back valid results using the following in my browser address bar: https://localhost:9443/jazz/oslc/workitems/8.json?oslc_cm.properties=dc:identifier,dc:title,dc:type{*},rtc_cm:ownedBy{dc:title}

It was easier to view the results using the "Advanced Rest Plugin" in chrome. You should also be able to use poster or some similar plugin in firefox.

{

"dc:identifier": 8,
"dc:type": {
"rtc_cm:category": "testtype",
"rtc_cm:dimmedIconUrl": null,
"rtc_cm:projectArea": {},
-
"rtc_cm:iconUrl": null,
"dc:identifier": "testtype",
"dc:title": "testType"
},
-
"rtc_cm:ownedBy": {
"dc:title": "Unassigned"
},
-
"dc:title": "test string test"

}

To get this to work you first want to log in to the server from the browser to set up the authentication and session info. Once you see this work (or not) you can start picking away at the problem with curl.

Hope that helps.

Daniel

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.