It's all about the answers!

Ask a question

Returning multiple resource entries from a single REST get


Vim Kapa (111) | asked Aug 03 '11, 3:08 a.m.
Hello,

I am attempting to use the RQM REST API to get all of the reservations within a project.

I started by doing a GET for the following URL:
https://SERVER:PORT/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PROJECT/reservation

That returned an XML file containing a list of reservation IDs, which I can then append to the end of the above URL to get an XML file that contains the reservation's id, reserved and reserve fields.

However, if I just append ?fields=anything to the end of the URL, like this:
https://SERVER:PORT/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PROJECT/reservation?fields=literallyanytext

Then I get an XML file with an <entry> block for each reservation and each <entry> block contains all of the above information.

1) Is the extra information that RQM returned when I added the ?fields= parameter expected? I hope so, as it would greatly reduce the # of REST GET requests I'd have to make.
2) Is there any way that I can select the fields that I want from the reservations? (e.g. I'd want the above listed fields + the specific machine information for each reservation)

Thank you for your time

2 answers



permanent link
Pramod Chandoria (2.1k11220) | answered Aug 04 '11, 5:21 a.m.
JAZZ DEVELOPER
You should get same data which contains rqm's feed format, having entry for each artifact with minimal info like name, summary, modified, href etc.

See https://<your>:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/schema/feed.xsd
for feed schema shape.

permanent link
Robert Rassmann (9923) | answered Aug 08 '11, 3:31 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hello,

I am attempting to use the RQM REST API to get all of the reservations within a project.

I started by doing a GET for the following URL:
https://SERVER:PORT/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PROJECT/reservation

That returned an XML file containing a list of reservation IDs, which I can then append to the end of the above URL to get an XML file that contains the reservation's id, reserved and reserve fields.

However, if I just append ?fields=anything to the end of the URL, like this:
https://SERVER:PORT/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PROJECT/reservation?fields=literallyanytext

Then I get an XML file with an <entry> block for each reservation and each <entry> block contains all of the above information.

1) Is the extra information that RQM returned when I added the ?fields= parameter expected? I hope so, as it would greatly reduce the # of REST GET requests I'd have to make.
2) Is there any way that I can select the fields that I want from the reservations? (e.g. I'd want the above listed fields + the specific machine information for each reservation)

Thank you for your time


The fact that .../reservation?fields=literallyanytext is returning all of the fields for reservation sees to be a convenient bug, so I wouldn't count on it continuing to work. Try .../reservation?abbreviate=false. This should return all of the fields in a supported way.

The fields command is not currently supported for reservation, so the feed will either contain the abbreviated fields or will contain them all.

- Rob

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.