REST API server 4 does not return user in JSON format
Hello, Before we upgraded our server to RTC 4 I was able to run a REST GET to the users service and receive the answer in a JSON table. https: //<server>:<port>/jts/users/<userid>?_mediaType="application/x-oslc-cm-change-request%2Bjson The server was upgraded to the version below and since then the response is returned in XML and I did not find any way around it. Change and Configuration Management - Core Libraries 4.0.0.1 RTC-I20120911-1740 Jazz Foundation - Core Libraries 4.0.0.1 RJF-I20120906-1745 236526: Contributor itemId value corrupted in TeamContributorSelectionDialog 4.0.0.1 wi236526 v20121119_0155 Anybody noticed something similar and has as suggestion? Should I change the mediaType , should I use a different method with the users service to obtain JSON data? Thanks, Alain
|
2 answers
It sounds like a regression was introduced in 4.0.0.1. You should enter a defect.
|
The URL for getting user information must be a query of oslc format:
$JAZZHOST/oslc/users.json?oslc_cm.query=rtc_cm:userId=%22$UID%22%20&oslc_cm.properties=*" This worked for me. Hope this helps anyone who is experiencing the same issue. Thanks, Binoy Comments
Alain robert
commented Apr 18 '13, 9:35 a.m.
Hello , I am using the URL returned in an WorkItem, it is not practicle to have to change the request to get the user information. I expect the URL to return JSON format. I registered defect 261448 for this issue. Thanks, Alain |
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.
Comments
yes. i seem to have the same issue. My Rest API call Accept headers were JSON format, and it returns in rdf+xml. I can't seem to get around it either. Do you have any update?
Hello Alain,
I'm faced the same issue for resource allocation. I used URI
https://clm.local:9443/ccm/rpt/repository/apt that previously returned XML with hrefs that pointed to JSON message.
I have to use different URI now:
https://clm.local:9443/ccm/rpt/repository/apt?fields=apt/workResourceDetails/(contributor/name|assignment|startDate|endDate)
See:
https://jazz.net/forum/questions/108307/closedoslc-how-to-process-character-in-httprequest