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 :
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.
One answer
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
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.
Comments
Paul Slauenwhite
FORUM MODERATOR / JAZZ DEVELOPER Apr 01 '15, 7:44 a.m.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
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.