rtc sdk
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
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:
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
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