It's all about the answers!

Ask a question

Get Record details from ClearQuest using Rest API


Nilesh Bawalekar (221117) | asked Mar 31 '15, 1:57 a.m.

HI,

I am using Poster to fetch details of defect from Rational ClearQuest. (8.0)

URL from Rest API :

https://adtbg306.accenture.com/cqweb/restapi/NGT_AIT/NGT_A/RECORD/NGT_A00000020?format=HTML&recordType=ADT_Defect&noframes=true

I get response as OK but got output in html fomat.

Same was working fine with RQM with REST API to fetch details for testcase,testscript,etc.

What i am missing here, please let me know.


Comments
Paul Slauenwhite commented Mar 31 '15, 10:22 a.m. | edited Apr 01 '15, 7:44 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

Two things:

1. You're not authenticated with CQ Web in Firefox and the HTML page is the authentication page.
2. You're not including the Accept request header and the default response from CQ Web is test/html.


Nilesh Bawalekar commented Apr 01 '15, 1:50 a.m. | edited Apr 01 '15, 7:44 a.m.

Hi Paul,

I have included authentication but not shown in above URL and also included Accept request Header.

How to get xml response from CQ Web.

One answer



permanent link
Donald Nong (14.5k414) | answered Apr 01 '15, 1:49 a.m.
http://www-01.ibm.com/support/docview.wss?uid=swg21445081

Note that you have "format=HTML" in the URL, so the output is _expected_ to be in HTML. You have to change it to "format=XML".

Comments
Nilesh Bawalekar commented Apr 07 '15, 3:05 a.m.

I tried that..its returninig status as "403 Forbidden."


Donald Nong commented Apr 07 '15, 11:54 p.m.

 "403 Forbidden" normally means that you have not logged on to ClearQuest. Make sure that you have "automatically login" option checked and provide the user name and password in the URL, as you will not get a prompt at all (it's no longer HTML).


Nilesh Bawalekar commented Apr 08 '15, 12:49 a.m.

Hi Donald,

I have included user name and password in given URL. It gives me status as 'OK' but output is in HTML format when format mention as HTML  : "?format=HTML&recordType=ADT_Defect&l"

When its change to format=XML it return as 403 Forbidden status.


Donald Nong commented Apr 09 '15, 1:15 a.m.

 There should be no extra options required. One more thing, you just said the response status was "OK", did you check whether you really got the record back, or it was a login prompt? It will be easier to tell if you just use the URL in Firefox, not Poster. 

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.