It's all about the answers!

Ask a question

What is XML parameter for OSLC queries?


Mike Shkolnik (9809161143) | asked May 13 '14, 5:56 p.m.
The following return HTML by default. How do I get them to return XML?

List all work item types for a project:
https://SERVER:PORT/jazz/oslc/types/PROJECTID/

List all states for a work item type:
https://SERVER:PORT/jazz/oslc/workflows/PROJECTID/states/WORKFLOWID/

2 answers



permanent link
Karthik Krishnan (8899123165) | answered May 13 '14, 11:11 p.m.
edited May 14 '14, 3:40 a.m.
 Try adding this Accept:application/xml in heder if you are using a REST client .


See http://open-services.net/bin/view/Main/CmRestApiV1?sortcol=table;up=#Media_Types_Used

Edit: What is the content of the html? is it about login? then you might need to login

Comments
Mike Shkolnik commented May 14 '14, 1:32 p.m.

https://SERVER:PORT/jazz/oslc/types/PROJECTID/?Accept:application/xml

Did not work. The parameter was ignored.


permanent link
Don Yang (7.7k21114139) | answered May 13 '14, 11:53 p.m.
Hi, Mike

In my test with RTC 4.0.4, I simply run via Firefox, it will still return XML instead of HTML.


What version of RTC do you use and what browser did you try? I remember that I did see the same issue before in Poster when login is not done properly(somehow I have to login to the server via browser first and then run the same commands in Posters.
The headers can be set to
Accept=application/xml
OSLC-Core-Version=2.0
in Poster (or other REST Client) to GET the XML response.


Comments
Mike Shkolnik commented May 14 '14, 1:29 p.m.

I need it in IE, which is defaulting to HTML. I am looking for a "?" parameter to add to the above URLs.


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.