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

What does a SNAPSHOT request look like for RQM?

  Looking to use the REST API to get general testcase/testscript information, and part of the process is needing to have a snapshot of a testscript. Does anyone have an example of what that request would look like and what the URL would look like?

0 votes


Accepted answer

Permanent link
All the information can be found here:
https://jazz.net/wiki/bin/view/Main/RqmApi#Create_a_Snapshot

Note that you need to use special tools and write your own program to send the SNAPSHOT and PROPFIND HTTP requests (as opposed to the usual GET, PUT and POST) to the RQM server.

When creating a snapshot, simply send a SNAPSHOT (similar to POST) HTTP request against the resource URI along with the snapshot information (title and description). So you would have something like this.
HTTP Request: SNAPSHOT
URL: https://clm:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/testcase/urn:com.ibm.rqm:testcase:3
Content to Send:
    < ns2:snapshot xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns3="http://purl.org/dc/elements/1.1/" >
        < ns3:title>TC3 Snapshot 1</ns3:title >
        < ns3:description/ >
    < /ns2:snapshot>
HTTP Response Code: 201
HTTP Response Header:
    Content-Location: https://clm:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/testcase/urn:com.ibm.rqm:testcase:3?revision=2
To get the artifact information in a snapshot, simply send a GET HTTP request against the URI in the "Content-Location" header. For existing snapshots, you need some extra steps to construct the URI. Firstly, send a PROPFIND HTTP request against the artifact resource URI, and you should get a XML representation of a list of snapshots. Then take the number out of the <ns2:revision> attribute and append "?revision=##" at the end of the artifact resource URI to get the snapshot URI.

Note: It may be a caveat or just by design, the revision number is from a sequence universal across the entire RQM server. For example, if you take a snapshot of a test case in project area A, and its revision number is 1, then when you take a snapshot of a test script in project area B, its revision number is 2. And when you go back to the same test case to take a second snapshot, its revision number is 3. As a result, it's almost mandatory to use the PROPFIND HTTP request to find out the revision number(s).
Brandon Ross selected this answer as the correct answer

0 votes

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 24 '16, 1:07 p.m.

Question was seen: 2,496 times

Last updated: Mar 24 '16, 11:54 p.m.

Confirmation Cancel Confirm