It's all about the answers!

Ask a question

What does a SNAPSHOT request look like for RQM?


Brandon Ross (132) | asked Mar 24 '16, 1:07 p.m.
  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?

Accepted answer


permanent link
Donald Nong (14.4k314) | answered Mar 24 '16, 11:54 p.m.
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

Your answer


Register or to post your answer.