How can I Obtain an Attachment ID Programmatically through the OSLC/REST API?
Our team is trying to determine the best way to obtain the attachment ID of an item that is posted via the API. We have no problem posting the attachment itself, but as far as we can tell there is no response info that contains the attachment ID of the item after we post it. These are the steps that are currently being used by our team to obtain an attachment ID immediately after it is posted:
1. Use a GET request to get back a feed of all attachments
Thanks! |
One answer
Check out this post. It appears that after you call the com.ibm.team.workitem.service.internal.rest.IAttachmentRestService service, you should get an UUID for the newly upload attachment. And from there, you can get the identifier of the attachment. Not sure whether you are using the same two steps to upload attachment though.
https://jazz.net/forum/questions/150849/how-to-upload-an-attachment-to-a-work-item-via-rest-api Comments
Brandie Collins
commented May 30 '14, 5:36 p.m.
I am not using a two part approach to upload attachments, however I will look at this question and see if there's any information I can take away from it that will help me. Thank you for taking the time to answer me -- if it helps me get to my answer then I will come back and mark it as accepted. |
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.