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

Get Record details from ClearQuest using Rest API

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.

0 votes

Comments

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.

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
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".

0 votes

Comments

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

 "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).

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.

 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 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,938

Question asked: Mar 31 '15, 1:57 a.m.

Question was seen: 7,323 times

Last updated: Apr 09 '15, 1:15 a.m.

Confirmation Cancel Confirm