Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes



2 answers

Permanent link
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.

1 vote

Comments

hello Ralph

i tried even with this link :
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=application/json&_pretty=true
but we  are not getting the result in json format :(

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:
Do the Open Services for Lifecycle Collaboration Workshop



Permanent link
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.

0 votes

Comments

Didnt know that Don. Thanks for sharing.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937

Question asked: Feb 19 '16, 1:20 a.m.

Question was seen: 4,092 times

Last updated: Feb 22 '16, 3:46 a.m.

Confirmation Cancel Confirm