It's all about the answers!

Ask a question

RQM REST API


Anvesh Reddy NallamaddiReddy (623) | asked Oct 07 '14, 8:30 a.m.
 I am trying to create a Test Script of type Command Line Prompt in RQM with the help of REST API's, using a xml template downloaded using GET command in REST API. The result in the Cmd prompt is shown as successfull, but Test Script is not getting created in RQM.

2 answers



permanent link
Donald Nong (14.5k614) | answered Oct 08 '14, 2:16 a.m.
You need to give more details for others to help you. I have no problems with creating a Test Script using a REST client in Chrome. The basic steps are as follows.
1. Prepare the XML content to upload/post.
2. Send a POST request to https://<server>:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testscript along with the XML content.
3. If successful, an HTTP 201 (created) will be returned, along with a "slug Id" in the "Content-Location" response header.
4. Append the "slug Id" to the Test Script resource URI and send a GET request - the newly created Test Script should be returned.
https://<server>:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testscript/slug__aHW1QE6xEeSO2Z-9nmiDRA

Comments
Anvesh Reddy NallamaddiReddy commented Oct 08 '14, 5:37 a.m.

 Hi Donald,


Thanks for your quick response.

Actually I am successfully able to create Test Cases using REST API's and even Test Scripts of type manual using the REST API's. My only trouble is while creating Test Scripts of type Command Line Prompt using POST command.

sorry, I am not able to add the screenshot of the response.


Donald Nong commented Oct 09 '14, 8:06 p.m.

Surely you mean "Command Line" type, not "Command Line Prompt"? I actually missed this point originally. To create a test script of the "Command Line" type, you need to use the "remotescript" resource, not "testscript" resource. I assumed that you took the template "like for like" but apparently that was not the case. I have no problems with creating such test scripts using REST API following the same steps mentioned above.


permanent link
Utkarsh Chitransh (111) | answered Aug 26 '20, 3:27 p.m.

Hello ,


This is how I tried and I also faced the same issue , no slug id has been created , Can you point out where I am going wrong this ?


cloudadmin@gfwa509:~$ vi /home/cloudadmin/inout.xml
cloudadmin@gfwa509:~$ /usr/lib/jvm/java-8-oracle/bin/java -Dcom.ibm.team.repository.transport.client.protocol="TLSv1.2" -jar /home/cloudadmin/RQMUrlUtility/RQMUrlUtility.jar -command POST -user uchitran@in.ibm.com -password xxx@1234 -filepath '/home/cloudadmin/inout.xml' -cookiePolicy BROWSER_COMPATIBILITY -url https://jazz01.rchland.ibm.com:13443/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/testcase
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                  <<<<<----- [ RQMUrlUtility ] ---->>>>>
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

RQMUrlUtility: Connected to https://jazz01.rchland.ibm.com:13443 using project "Quality+Manager"
Attempting to create protocol context using system property: TLSv1.2
RQMUrlUtility: Calling [ HTTP POST ] method to upload XML from a specified file to URL
RQMUrlUtility: Server Response code: 201
RQMUrlUtility: [ SUCCESS ] File : "/home/cloudadmin/inout.xml" successfully posted to URL : "https://jazz01.rchland.ibm.com:13443/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/testcase "

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.