It's all about the answers!

Ask a question

How to download an attachment through OSLC in RTC

Chandan M B (1133474) | asked Apr 24 '15, 12:20 a.m.
I have a WI and i have attached some files attached to it.
I need to get OSLC link for that attachment and if i click on it. It should directly start downloading an attachment


2 answers

permanent link
Lakshman Kakumani (111) | answered Aug 08 '18, 6:59 p.m.


good noon,

I have a custom requirement to implement the new functionality.

Step 1: Developer will create defect work item in RTC. 
Step 2: He will attach the text file to the work item.
Step 3: I need to write a script to download the attachment from work item & copy to specific directory  [Custom requirement ]
Step 4: I'll point the script into the build definition

Can you please guide me how to do the step 3 ?
Thank you

permanent link
Donald Nong (14.5k414) | answered Apr 24 '15, 1:20 a.m.
Just do a simple GET of the OSLC 2.0 representation of the WI, and you should see something like this.
  <rdf:Description rdf:nodeID="A0" >
    <rdf:subject rdf:resource="https://clm/ccm/resource/itemName/"/ >
    <rdf:predicate rdf:resource=""/ >
    <rdf:object rdf:resource=""/ >
    <rdf:type rdf:resource=""/ >
    <dcterms:title>Attached File Name</dcterms:title >
  </rdf:Description >
Where "subject" is the WI itself, "object" is the OSLC link to the attachment, and "title" is the name of the attachment.
But I'm curious, when you said "click", did you mean working in a browser or a custom built application? If it's a browser, I can't see why you need to link since the RTC Web GUI allows you to download the attachment. If it's a custom built application, then the application has to handle this.

Chandan M B commented Apr 24 '15, 1:30 a.m.

Hi Donald,

Yes, i want to get OSLC link of attachment and pass it to my custom application through server side plugin.
In my custom application if i click on this OSLC link it should start downloading automatically.

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.