It's all about the answers!

Ask a question

How to get RTC Project Area information through REST API?


Priya Mutha (611) | asked Feb 16 '14, 7:21 p.m.
I can query RTC to get all project areas for a particular user via the Draft Team Process Rest API (https://jazz.net/wiki/bin/view/Main/DraftTeamProcessRestApi#GET_project_areas_collection) using the "has member" query parameter. This returns data in XML format. I would like to know about the following two things:
1. Is there a way get all project areas for a particular user (a 'has member' equivalent) in JSON format?
2. There are other attributes about a project area, like project duration, project status which can be seen in the web (they may be custom widgets). Is there a way to get this information? Is there any REST API for this?

Thank you very much.

2 answers



permanent link
Donald Nong (14.5k614) | answered Feb 16 '14, 8:03 p.m.
1. Even I added an HTTP header "Accept: application/json", only the XML format was returned. I believe JSON is not yet supported. The linked document does not mentioned JSON either.
2. I would not call them "attributes" if you cannot see them in the returned HTTP response. Some information may need calculation and you have to do the same.

Comments
Priya Mutha commented Feb 25 '14, 2:00 p.m.

 Thank you, Donald!


Is there a way to access the widget information of a particular template? How is this information stored?


Donald Nong commented Feb 25 '14, 11:36 p.m.

Sorry I don't know any ways to do this. As far as I understand, some widgets involve calculation and getting information several times. I also believe that some information cannot be retrieve using REST API anyway.


permanent link
Canberk Akduygu (99237371) | answered Mar 07 '14, 8:48 a.m.
I added an HTTP header "Accept: application/text" to my https://server:9443/admin/projects Rest call but I get JSON represenation of the result.

But when I call this URI from browser, I got an XML representaion.

How can we get this call's reponse in xml format?

Comments
Donald Nong commented Mar 09 '14, 7:52 p.m.

Are you sure you got an XML response in the browser? I always get a JSON response not matter what clients I use. And it is expected according to the specification.
https://jazz.net/wiki/bin/view/Main/DraftLPARestAPI#GET_projects_service

Get the list of lifecycle projects in the repository, as JSON text.


Canberk Akduygu commented Mar 13 '14, 8:20 a.m.

Sorry Donald I mis-wrote my message.

As you said I always got JSON representation of this call. I need it in XML format.
I had difficulties parsing JSON.


sam detweiler commented Mar 13 '14, 8:27 a.m.

 Arne posted a nice short answer that showed how to parse json easily


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.