What does a SNAPSHOT request look like for RQM?
Accepted answer
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.
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).
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: SNAPSHOTTo 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.
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
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).