Returning multiple resource entries from a single REST get
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
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
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