It's all about the answers!

Ask a question

how to view the XML of RTC Work Item in REST Client or browser


Chidambaram . (2073162) | asked Feb 29 '16, 9:14 a.m.
I have configured the REST Client in Firefox. What headers to apply to retrieve the XML of the RTC work item ?

2 answers



permanent link
Dinesh Kumar B (4.1k413) | answered Feb 29 '16, 9:50 a.m.
JAZZ DEVELOPER
edited Feb 29 '16, 9:51 a.m.
Hi Chidambaram,

I think the most basic ones you need are :

Accept
OSLC-Core-Version
X-Jazz-CSRF-Prevent

the below link has various examples with appropriate headers :
https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20#Getting_Representations

Getting the value for X-Jazz-CSRF-Prevent is a little tricky, here is the extract from the same (mentioned above) link on it :

Note: Starting in Rational Team Concert 4.0.0.1, Jazz Team Server performs an additional check for the X-Jazz-CSRF-Prevent header when an HTTP POST access request is issued from a browser. The HTTP POST access request is detected by the Jazz Team Server through the user-agent header. You can add the X-Jazz-CSRF-Prevent header by using the current JSESSIONID value in a browser tool (for example, Poster or RESTClient). To perform this task, search your cookies and copy the Content value of the JSESSIONID for the fully qualified host name (path and host name) corresponding to the public URI of your Jazz Team Server.

you should be up and running with this..

hope this helps.

Regards,
Dinesh

permanent link
Krzysztof Kaźmierczyk (7.4k35198) | answered Feb 29 '16, 12:20 p.m.
Hi Chidambaram,
Here are my steps:
  1. Set the url to https://your-server/ccm/ccm/oslc/workitems/1.xml. This is an example if you want to fetch work item number 1.

  2. Set username and password in authentication options

  3. In the headers select the following one:
    name: Accept
    value: text/xml

Let us know if that works.

Comments
Chidambaram . commented Mar 01 '16, 12:16 p.m. | edited Mar 01 '16, 12:35 p.m.

Launching https://server:port/ccm/oslc/workitems/1.xml in the browser

shows the XML for Work Item number 1.

REST Client was is not required.

But I could not see the Approval entries in the XML. How to see the Approval entries. I need to mass update "Approval" in more than 400 work items. Each work item has 4 Approval entries created by "Approval PlugIn" (owned by IBM ISSR USA team.)

Your answer


Register or to post your answer.