Is there a command line option available to download attachments of a work item?
If there is a file attached in the links section of a work item. is there any way to download it using command line?
|
Accepted answer
Ralph Schoon (63.3k●3●36●46)
| answered Aug 30 '12, 5:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,
no, there is no command line tool available for work items and also no tool to download attachments OOTB. You can write a tool using the Plain Java Client Libraries. See https://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/ for the reverse operation. I assume you could figure out how to download from that. Ralph Schoon selected this answer as the correct answer
Comments Thank you for your answers. Will look at the proposed solution.
Ralph Schoon
commented Sep 20 '12, 12:20 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Chethna, please accept an answer you find most appropriate in the future. this helps keeping the forums maintained. |
2 other answers
There's also the OSLC CM API. For example, https://jazz.net/jazz/oslc/workitems/74964?OSLC-Core-Version=2.0 contains:
<rtc_cm:com.ibm.team.workitem.linktype.attachment.attachment rdf:ID="n4"rdf:resource="https://jazz.net/jazz/resource/itemOid/com.ibm.team.workitem.Attachment/_0g3i8BfSEd63kMlrUwKMrg"/>
Unfortunately that request is blocked by out whitelist on jazz.net, but it may work for your server.
I would return an item describing the attachment, not the attachment contents itself, but should contain the content id. The content could then be fetched using <repo root>/content/<contentId>.
I'm having trouble giving a better example at the moment because my VPN is down.
Comments Note that the rtc_cm:...attachment property is RTC-specific, so this approach would not work with any other OSLC CM provider. |
|
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.