It's all about the answers!

Ask a question

Lab Resources with the REST API


0
1
Chris Ruhl (145) | asked Jul 30 '12, 5:03 p.m.
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

5 answers



permanent link
Hao Wan (1.5k35) | answered Jul 31 '12, 12:03 a.m.
JAZZ DEVELOPER
edited Jul 31 '12, 12:21 a.m.
Hi Chris,
you can have a try with the following url when PUT lab resources.


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



permanent link
Pramod Chandoria (2.1k11220) | answered Jul 31 '12, 1:26 a.m.
JAZZ DEVELOPER
Another advice is do a GET on existing labResource and compare the xml
See RqmApi for more details.

permanent link
Chris Ruhl (145) | answered Jul 31 '12, 12:02 p.m.
Hao Wan and Pramod, your suggestions were very helpful, thank you!

Hao Wan what is the XLS provider ?  Adding this to the URL worked with no errors, but I can't find any documentation the refers to XLS.

-chris

permanent link
Hao Wan (1.5k35) | answered Aug 01 '12, 5:32 a.m.
JAZZ DEVELOPER
 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

permanent link
Brian Lahaie (1081514) | answered Nov 25 '13, 3:15 p.m.
 Also, the lab resources API has been enhanced in the 4.0.5 release.

As a User, I want to be able to access all LabResource attributes via reportable REST API
https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.viewWorkItem&id=92722

Your answer


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