POST of a test suite result doesn't return any content
Hi,
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult">
<rqm:resultId xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult">14356</rqm:resultId>
<rqm:resultItemId xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult">_FLdpoyUIEeempt5qUMUPeA</rqm:resultItemId>
<rqm:resultExternalId xmlns:rqm="http://schema.ibm.com/rqm/2007#executionresult">slug__FKbH0CUIEeempt5qUMUPeA</rqm:resultExternalId>
</entry>
can someone let me know how to get get the same information when creating a new test suite result?
Accepted answer
What you described is not the expected behavior. In other words, you should not rely on the response body to find out the newly created resource, which is not in the specification. Instead, you should use the response header to proceed further.
1. If using RQM OSLC API, you would POST to the CreationFactory link. If successful, you should get an HTTP 201 code, and the response header "Location" contains resource URI of the newly created resource. Easy.
2. If using the RQM reportable REST API, you would POST to the https://hostname/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<Project Area>/testsuite/. If successful, you should get an HTTP 201 code, and the response header
"Content-Location" contains the ID (also called a slug) of the newly created resource. You can then access it by the link
https://hostname/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<Project Area>/testsuite/<Slug>
https://jazz.net/wiki/bin/view/Main/RqmApi#HTTP_PUT_POST_Requests