Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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?

0 votes


Accepted answer

Permanent link
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

0 votes

Comments

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


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

That's exactly what I needed, thanks! 


One other answer

Permanent link
 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.

0 votes

Comments

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941
× 218

Question asked: Sep 09 '14, 11:43 p.m.

Question was seen: 5,853 times

Last updated: Sep 26 '14, 7:12 a.m.

Confirmation Cancel Confirm