Lab Resources with the REST API
I'm working w/ Firefox + Poster to post a very basic resource - I'm using this URL:
https://theserver/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Remote+Services+Lab+v2+%28Quality+Management%29/labresource/ite-bt-ZZZ
To post via PUT this resource:
<labresource xmlns="http://jazz.net/xmlns/alm/qm/v0.1/" >
<projectArea alias="Remote+Services+Lab+v2+%28Quality+Management%29" href="https://rqm-dev.stglabs.ibm.com/qm/resource/itemOid/com.ibm.team.process.ProjectArea/_Y57OEMoDEeGDP8XxeXNUXA"/>
<title>ite-bt-ZZZ</title>
<name>ite-bt-ZZZ</name>
</labresource>
From this I get error 400 ( Bad Request ) I see no errors in qm.log.
Am I missing something simple?
I can update existing resources with a similar set-up but new stuff fails :/
Any input would be appreciated!
-chris
It seems that I can update existing resources
https://theserver/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Remote+Services+Lab+v2+%28Quality+Management%29/labresource/ite-bt-ZZZ
To post via PUT this resource:
<labresource xmlns="http://jazz.net/xmlns/alm/qm/v0.1/" >
<projectArea alias="Remote+Services+Lab+v2+%28Quality+Management%29" href="https://rqm-dev.stglabs.ibm.com/qm/resource/itemOid/com.ibm.team.process.ProjectArea/_Y57OEMoDEeGDP8XxeXNUXA"/>
<title>ite-bt-ZZZ</title>
<name>ite-bt-ZZZ</name>
</labresource>
From this I get error 400 ( Bad Request ) I see no errors in qm.log.
Am I missing something simple?
I can update existing resources with a similar set-up but new stuff fails :/
Any input would be appreciated!
-chris
It seems that I can update existing resources
5 answers
Hi Chris,
you can have a try with the following url when PUT lab resources.
from https://jazz.net/wiki/bin/view/Main/ResourceObjectsAndTheirRelationships#Test_Resource_Relationships
10 The
labresource
<feedUrl> may contain the following trailing segments for
labresource
resources managed by an external provider:
/<provider name>/<provider instance>
For example:
<feedUrl>/provider/providerInstance
Hi Chris,
you can refer to the following description
A Lab Resource represents an actual machine or virtual image that exists in the test lab. These often correspond to development milestones. Test management tools typically allow planning of test cases within test phases, and querying of the status of test cases within a given phase. The xml for a lab resource comes in two formats. The first is a TDM format that is used in itra-machine communication of a resource specification. The format of the data contained in the tdm element is not documented here. The second is a simple format that is human readable and can be used in reporting. The format of the xml must be specified as a query argument in the url. It is specified as format=tdm or format=simple. A default of tdm is used if no format is specified. For example: //server/jazz/secure/service/com.ibm.rqm.integration.service.IIntegrationService/labresource/1?format=simple. The id of a machine may be specified in two ways. The first url format is used if the machine is to be put into the system by an external provider or to access a machine that was put into the system by an external provider. This format is of the form: https://server/.../labresource/PROVIDER/PROVIDER_INSTANCE/ID?format=simple|tdm. PROVIDER is the name of the external system integrating with the LM system (such as BuildForge). PROVIDER_INSTANCE is the specific instance of that provider (such as the BuildForge server name). The second url format is used in the case where there is no external provider. In this case the internal integer id of the resource can be used. This format is of the form: //server/.../labresource/1?format=simple|tdm where 1 is the internal id of the resource.
copied from