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

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..

1

1 vote


Accepted answer

Permanent link
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

0 votes

Comments

Correct.

Note, the webId property is only supported for a subset (roughly half) of resources.


One other answer

Permanent link
You would have to use another HTTP client that displays HTTP response headers since the resource ID is contained in the Content-Location header.

0 votes

Comments

It returns Generated ID something like this slug1SgOcSiQEeKeLMV6FKvWKw
I want RQM generated numeric ID. I am not sure if we can use this slug
1SgOcSiQEeKeLMV6FKvWKw for getting XML content of resource. Please suggest.

This is the generated external ID.  It can be the ID of the URL used to GET the resource XML.

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

Question asked: Nov 06 '12, 7:13 a.m.

Question was seen: 6,618 times

Last updated: Nov 08 '12, 6:22 a.m.

Confirmation Cancel Confirm