It's all about the answers!

Ask a question

Using RQM REST API to obtain attachment name of a test case?


Rophy Tsai (231017) | asked Sep 09 '14, 11:43 p.m.
I can get attachment links of a test case with the following:
GET /qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PRJAREA/testcase/ID

and, I can get attachment name of all attachments with the following:
GET /qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PRJAREA/attachment

However:
  • the attachment link may NOT be identical in the above 2 GET requests, since ID might be generated, internal or external
  • GET the attachment link downloads the attachment instead of providing me attachment information

My question is: How do I get the file name of attachments of a test case?

Accepted answer


permanent link
Paul Slauenwhite (8.4k12) | answered Sep 10 '14, 9:31 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Unfortunately, you have to make two RQM Reportable REST API requests:

1. GET test case to resolve the attachment URL(s).
2. GET attachment feed (or resource) to resolve the attachment name.
Rophy Tsai selected this answer as the correct answer

Comments
Rophy Tsai commented Sep 10 '14, 2:15 p.m.

The problem is that the attachment URLs obtained from GET testcase actually download the attachments instead of showing attachment information.



Paul Slauenwhite commented Sep 10 '14, 3:16 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Use the Accept=application/xml header on your GET request.  See https://jazz.net/wiki/bin/view/Main/RqmApi#ResourcesFootnote6.


Rophy Tsai commented Sep 13 '14, 3:33 p.m.

That's exactly what I needed, thanks! 

One other answer



permanent link
raghu g (10710) | answered Sep 26 '14, 2:36 a.m.
 Hi Rophy Tsai ,

I need the same requirement what you are working on but i am not clear how to run the XMl file in java to obtain RQM details for a test case , could you please help me regarding this.

Comments
Paul Slauenwhite commented Sep 26 '14, 7:12 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

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.