How to get the result by Json in Rest API ?
Hello
I want to get the Result in Json for Rest Url Below is the link i am using to get the result using json. Please let me know where i am missing ? https://rb-ubk-clm-04.de.bosch.com:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[id=%275501%27]/%28children/%28target/name|id|category/name%29%29&_mediaType=text/json&_pretty=true |
2 answers
I don't think the RTC reportable REST API is implemented with JSON at all. It ignores "Accept" header, and does not recognize file extension (*.xml, *.json and etc). It _always_ respond with XML content (there is no content negotiation). In other words, no matter how you "trick" the server, it will not give you media type other than XML.
|
Ralph Schoon (63.1k●3●36●46)
| answered Feb 19 '16, 1:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please go through the
Open Services for Lifecycle Collaboration Workshop
You have to specify application/json in the request header. the mediaType is not what OSLC is looking for. Comments
vinitha dsouza
commented Feb 19 '16, 3:13 a.m.
hello Ralph
Ralph Schoon
commented Feb 19 '16, 3:19 a.m.
| edited Feb 19 '16, 3:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I would really consider to read the document and play with the examples to understand what you need to do. Just adding stuff to the URL does NOT set the request header.
This is a screenshot of a REST client with proper headers set:
|
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.