RQM Rest Api - How to get and update the state of test plan,test suite,test case and test script.
2 answers
The API Docs can be found here(https://jazz.net/wiki/bin/view/Main/RqmApi), but are hard to understand at first.
This table (https://jazz.net/wiki/bin/view/Main/RqmApi#Resources_and_their_Supported_Op) maps the UI name to the REST API name
This table (https://jazz.net/wiki/bin/view/Main/RqmApi#FieldsSelectionNote) shows what fields are available in each resource
To GET/POST/PUT/etc. the resource you'll want to hit an endpoint of this format:
https://<etm-host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_name>/<resource_type>/urn:com.ibm.rqm:<resource_type>:<resource_internal_id>
So an example for testcase would be:
https://MyEtmHost/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/MyProject/testcase/urn:com.ibm.rqm:testcase:12345
Running a GET on that will give you an xml that matches the schema documented here: https://jazz.net/products/test-management/api-doc-7.0.3/
POST will require you to build your own xml and upload it to https://<etm-host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_name>/<resource_type>
In my opinion the easiest method for building the xml is to pull down an existing resource, edit it, and then push the changed xml back up.
The API Docs can be found here(https://jazz.net/wiki/bin/view/Main/RqmApi), but are hard to understand at first.
This table (https://jazz.net/wiki/bin/view/Main/RqmApi#Resources_and_their_Supported_Op) maps the UI name to the REST API name
This table (https://jazz.net/wiki/bin/view/Main/RqmApi#FieldsSelectionNote) shows what fields are available in each resource
To GET/POST/PUT/etc. the resource you'll want to hit an endpoint of this format:
https://<etm-host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_name>/<resource_type>/urn:com.ibm.rqm:<resource_type>:<resource_internal_id>
So an example for testcase would be:
https://MyEtmHost/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/MyProject/testcase/urn:com.ibm.rqm:testcase:12345
Running a GET on that will give you an xml that matches the schema documented here: https://jazz.net/products/test-management/api-doc-7.0.3/
POST will require you to build your own xml and upload it to https://<etm-host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project_name>/<resource_type>
In my opinion the easiest method for building the xml is to pull down an existing resource, edit it, and then push the changed xml back up.
You specifically asked for GET and POST, but to achieve the goal of updating the status, e.g. changing the status of a Test Case from Draft to Approved or updating the result of a Test Case after execution, you will need a PUT operation.