IBM Support

Using the RESTClient for Mozilla Firefox and Google Chrome.

How To


Summary

Using the RESTClient for Mozilla Firefox and Google Chrome.

Objective

This document covers the basics using Rational Quality Manager (RQM) specific data. Using the REST Client you are able to add, modify, and retrieve test and lab resources from RQM. The REST Client is a Firefox and Chrome browser add-on that facilitates interaction with a HTTP server's RESTful API. It allows you to send and receive content from a URL using standard HTTP actions, such as PUT, POST, GET and DELETE. For more information on the REST API specification check out:

 

* https://jazz.net/wiki/bin/view/Main/RqmApi

http://www.xml.com/pub/a/2004/12/01/restful-web.html

* https://restfulapi.net/

* https://sleroyblog.wordpress.com/2013/04/09/querying-rqm-40-through-oslc-and-rest-api/

 

With RQM installed and running and the REST Client add-on added to Firefox or Chrome, you are ready to add, modify, and receive content through RQM's REST API for test and lab artifacts.

Steps

Log into the RQM server in the Firefox browser. Since the REST Client runs as a browser add-on, it will share the authenticated session from your logged-in account in your browser. There are 3 areas of particular note in the REST Client dialog.

 

* URL : this corresponds to the asset / resource you want to interact with in RQM

* Method : select GET or PUT to either retrieve content or add / modify content

* Body : only used in a PUT where content will be added/modified. This is the resource specification in XML.  


Note: The RQM API is constructed so that when a resource is retrieved from the server it will open the resource in the RQM Web UI.  This is not what is wanted when using REST Client. To tell the server that XML content is wanted rather than the redirect, an accept header must be added.  To do this, click on the "Headers" tab next to the "Authentication" drop down. This will present a pop-up UI that will allow the creation of additional headers. In this UI, add a header named "accept"  with a value of "text/xml". After doing this any GET operation will return the resource as XML.

In the example above, we performed a GET on Test Case 10, from the browser, the URL would display as: 

https://localhoast:9443/qm/web/console/JKE%20Banking%20(Quality%20Management)#action=com.ibm.rqm.planning.home.actionDispatcher&subAction=viewTestCase&id=10

However that is not what the REST Client can use to retrieve the XML data for Test Plan 10. The REST Client would need to use the following format below:

https://hostname:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/testcase/urn:com.ibm.rqm:testcase:10

For additional information on retrieving the URL to use with the REST API, see the link below:

https://jazz.net/wiki/bin/view/Main/RqmApi

From the above output, below is a portion of the XML data that was retrieved from the GET.

 

<?xml version="1.0" encoding="UTF-8"?><ns2:testcase xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns1="http://schema.ibm.com/vega/2008/" xmlns:ns3="http://purl.org/dc/elements/1.1/" xmlns:ns4="http://jazz.net/xmlns/prod/jazz/process/0.6/" xmlns:ns5="http://jazz.net/xmlns/alm/v0.1/" xmlns:ns6="http://purl.org/dc/terms/" xmlns:ns7="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1" xmlns:ns10="http://open-services.net/ns/core#" xmlns:ns11="http://open-services.net/ns/qm#" xmlns:ns12="http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/" xmlns:ns13="http://www.w3.org/2002/07/owl#" xmlns:ns14="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" xmlns:ns15="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" xmlns:ns16="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" xmlns:ns17="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1" xmlns:ns18="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/" xmlns:ns20="http://jazz.net/xmlns/alm/qm/styleinfo/v0.1/" xmlns:ns21="http://www.w3.org/1999/XSL/Transform"><ns2:projectArea href="https://localhost:9443/qm/resource/itemOid/com.ibm.team.process.ProjectArea/_c0RVoIypEeidkdhyCC75aA" alias="JKE+Banking+%28Quality+Management%29"/><ns3:identifier>https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/testcase/urn:com.ibm.rqm:testcase:10</ns3:identifier>

Note the "identifier" tag. This contains the URL that should be used in the URL field of the REST Client (it is in bold). In the REST Client,  set the URL to the identifier URL (above), set the Method to "PUT", and paste the XML content in the Body window. It should look like this:

B13DA2CA-78FA-455E-8601-C070E0FD3733

In this example, we will modify the description of a Test Case.

48C04D66-1B06-4DE7-AC71-3EA899F1D500

In order to do this, edit the XML from the GET, and look for the following section:

<ns3:description>Hello World</ns3:description>

2D78260A-223E-4809-8BD9-C87215CB6DC8

Edit the value of the description and place the contents of the XML in the body of the REST Client.

Click SEND

Refresh the Test Case, and the description will have changed.

1E4AE914-8F69-4927-8456-D5DB1B981363

Additional Information

Document Location

Worldwide

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSUVV6","label":"IBM Engineering Test Management"},"Component":"","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Quality Manager

Document Information

Modified date:
12 June 2019

UID

ibm10879103