It's all about the answers!

Ask a question

Creating reservation using RQM rest API


Unknown User (1113) | asked May 25 '11, 7:59 a.m.
Hi,
I am desperately trying to create reservation using RQM REST API

I am using HTTP POST request

I first call
java -jar RQMUrlUtility.jar -command GET -user USER -password PASSWORD

-url

'https://localhost:9443/jazz/service/com.ibm.rqm.integration.service.II

ntegrationService/resources/MY+Lab/reservation/RS22' -filepath

reserv.xml

and receive the following xml


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:reservation

xmlns:ns11="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1"

xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1"

xmlns:ns10="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1"

xmlns:ns7="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1"

xmlns:ns6="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/"

xmlns:ns5="http://jazz.net/xmlns/alm/v0.1/"

xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/"

xmlns:ns3="http://schema.ibm.com/vega/2008/"

xmlns:ns4="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1"

xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/"

xmlns="http://purl.org/dc/elements/1.1/">
<identifier>RS22</identifier>
<ns2:reservedFor>gorge</ns2:reservedFor>
<ns2:reservedBy>gorge</ns2:reservedBy>
<ns2:reserveTo>2011-05-25T20:59:00.000Z</ns2:reserveTo>
<ns2:reserveFrom>2011-05-24T21:00:00.000Z</ns2:reserveFrom>
<ns2:visibleId>22</ns2:visibleId>
<ns2:labresource

href="https://localhost:9443/jazz/service/com.ibm.rqm.integration.servi

ce.IIntegrationService/resources/MY+Lab/labresource/urn:com.ibm.rqm:lab

resource:2"/>
</ns2:reservation>

The I try to invoke

java -jar RQMUrlUtility.jar -command POST -user rqmadmin -password

rqm4ibm -url

'https://localhost:9443/jazz/service/com.ibm.rqm.integration.service.II

ntegrationService/resources/MY+Lab/reservation' -filepath reserv.xml

I get Response code: 415

I tried to remove the identifier and the visibleId from xml and this

doesn't work
Trying put returns Response code: 500

How can I post reservation ? To what url should I post it and what

elements should I include in the xml

One answer



permanent link
Paul Slauenwhite (8.4k12) | answered May 25 '11, 9:39 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi,
I am desperately trying to create reservation using RQM REST API

I am using HTTP POST request

I first call
java -jar RQMUrlUtility.jar -command GET -user USER -password PASSWORD

-url

'https://localhost:9443/jazz/service/com.ibm.rqm.integration.service.II

ntegrationService/resources/MY+Lab/reservation/RS22' -filepath

reserv.xml

and receive the following xml


<xml>
<ns2>
<identifier>RS22</identifier>
<ns2>gorge</ns2>
<ns2>gorge</ns2>
<ns2>2011-05-25T20:59:00.000Z</ns2>
<ns2>2011-05-24T21:00:00.000Z</ns2>
<ns2>22</ns2>
<ns2>
</ns2>

The I try to invoke

java -jar RQMUrlUtility.jar -command POST -user rqmadmin -password

rqm4ibm -url

'https://localhost:9443/jazz/service/com.ibm.rqm.integration.service.II

ntegrationService/resources/MY+Lab/reservation' -filepath reserv.xml

I get Response code: 415

I tried to remove the identifier and the visibleId from xml and this

doesn't work
Trying put returns Response code: 500

How can I post reservation ? To what url should I post it and what

elements should I include in the xml


You have to use the external ID (see https://jazz.net/wiki/bin/view/Main/RqmApi#Types_of_IDs_in_RQM) in the labresource URL (see http://jazz.net/projects/rational-quality-manager/api-doc-2.0/api-files/schemas/qm_xsd/elements/reservation.html#r3).

That said, this appears to be a defect (see https://jazz.net/jazz02/resource/itemName/com.ibm.team.workitem.WorkItem/51659).

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.