It's all about the answers!

Ask a question

How to upload file using RQM Reportable REST API?


Edward Wen (132) | asked Apr 26 '22, 4:53 a.m.
Hi,

I would like to know how to load file using Reportable REST API.
I know RQMUrlUtility can do this, but I prefer to use API first.

Thank you for your help.

Accepted answer


permanent link
Davyd Norris (2.4k217) | answered Apr 27 '22, 7:20 p.m.
The Reportable REST API, as the name suggests, is for reporting. It's a read only API.

Your best option is the OSLC REST API, which is a CRUD API
Edward Wen selected this answer as the correct answer

Comments
Edward Wen commented Apr 27 '22, 9:14 p.m.
Hi Davyd,

I will study OSLC REST API.


Many thanks.

One other answer



permanent link
Ralph Schoon (63.3k33646) | answered Apr 28 '22, 2:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Apr 28 '22, 3:15 a.m.
As far as I can tell, the name Reportable REST API suggests it is for reporting only. That has always been my first reaction too.

But looking into https://jazz.net/wiki/bin/view/Main/RqmApi suggests that this is not necessarily the case as it seems to support POST requests:


When looking into the RQM URL Utility https://jazz.net/wiki/bin/view/Main/RQMURLUtility#Running_ETM_URL_Utility the URI it uses to upload stuff mentioned in this example https://jazz.net/wiki/bin/view/Main/RQMURLUtility#UPLOAD
contains com.ibm.rqm.integration.service.IIntegrationService which is basically the same URI schema that is mentioned in https://jazz.net/wiki/bin/view/Main/RqmApi#integrationUrl

So for all I can tell, the RQM URL Utility uses the Reportable REST API to do what it does. I think carefully looking into the working example and reading up on the Reportable REST API documentation should be promising.

With respect to upload of files, so far I have not seen any OSLC API that implemented it. I might be wrong, as this has so far not been my focus.

Comments
Davyd Norris commented Apr 28 '22, 2:29 a.m.
Well THAT'S interesting! It does look like they've provided a full CRUD API unlike the other applications.

It looks like you can upload a file as an attachment if that's what you want to do. The following is a list of all resources along with what REST operations are supported:


Ralph Schoon commented Apr 28 '22, 2:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

ETM seems to be the exception from the rule, Davyd. I would be interested in seeing working examples. Not sure I can spend the time.


Ralph Schoon commented Apr 28 '22, 4:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I just did a file upload with the Reportable REST API using Postman

I posted to https://elm.example.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/attachment

I followed https://www.youtube.com/watch?v=S7bwkys6D0E to specify the multipart\form-data and I sent the file. I can download the file using the location header for the created item.

The only trick is now to understand the multipart stuff.


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.