Getting ID of newly created test case using POST method
Hi,
When I create new test case using POST method, is there any way to get the ID of newly created test case ? Currently I am using RQMUrlUtility.jar and it gives output URL after post which does not contain test case ID: ex: https://server:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/TestProject/testcase which does not have ID.. |
Accepted answer
You can do a GET again using the externalId generated
e.g. GET https://localhost:9443/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality Manager/testcase/slug__G0QpcSibEeKeLMV6FKvWKw with header accept: application/xml The response should contain the XML of the artifact. In the xml you can look for webId, that is the internal integer Id of the artifact created. Chandrahasa Reddy D selected this answer as the correct answer
Comments Correct.
|
One other answer
You would have to use another HTTP client that displays HTTP response headers since the resource ID is contained in the Content-Location header.
Comments
Chandrahasa Reddy D
commented Nov 06 '12, 11:11 p.m.
It returns Generated ID something like this slug1SgOcSiQEeKeLMV6FKvWKw
This is the generated external ID. It can be the ID of the URL used to GET the resource XML. |
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.