Is there a command line option available to download attachments of a work item?
Accepted answer
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.
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.
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.