Retrieving attachment contents using oslc
Akshata Kulkarni (37●3●20)
| asked Jun 09 '15, 8:24 a.m.
edited Jun 09 '15, 9:26 a.m. by Ralph Schoon (63.6k●3●36●46)
Hi,
I have attached a pdf to a workitem .How can i read the pdf contents using oslc? Thanks in advance ! |
3 answers
Ralph Schoon (63.6k●3●36●46)
| answered Jun 09 '15, 9:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
See this discussion. Maybe that helps: https://jazz.net/forum/questions/150849/how-to-upload-an-attachment-to-a-work-item-via-rest-api it is for upload, but maybe there is a similar approach.
I only have code for uploading and downloading using Java in https://rsjazz.wordpress.com/2012/09/21/downloading-attachments-from-work-items/ and https://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/ |
Not quite sure it's doable as it seems to be blocked in my environment. Here are the steps that I use.
1. Access the work item shortcut /ccm/resource/itemName/com.ibm.team.workitem.WorkItem/### 2. Locate the attachment in the XML presentation, which is the <rtc_cm:com.ibm.team.workitem.linktype.attachment.attachment> tag. 3. Access the attachment link /ccm/resource/itemOid/com.ibm.team.workitem.Attachment/xxxxxxxxxxxxx. The response contains details about the attachment, such as file type, file size and etc. The link to the actual file content is the <rtc_cm:content> tag. 4. Try to access the content link but I get this warning. You have followed a direct link to content hosted in a Jazz server. This page has been presented to ensure that a malicious website cannot use cleverly crafted content to circumvent security. If you would like to access the content, please use the link below. |
Hi Donald-
You can’t actually see attachments using OSLC integration. Not only can you not read/retrieve the attachment, you don’t even know it’s there. The rich hover & Adapter UI functionality does not show attachments.
To retrieve an attachment, you could use the Rational Lifecycle Integration Adapters-Tasktop Edition (RLIA-TE), you can learn more about RLIA-TE here:
http://www-304.ibm.com/partnerworld/gsd/solutiondetails.do?&solution=46335&lc=en
Please feel free to reach out to me if you have any questions!
Thanks and Best
b
|
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.