It's all about the answers!

Ask a question

How to upload file using REST API?


Wasim Elias (611) | asked Oct 06 '14, 6:26 a.m.
edited Nov 18 '14, 11:47 a.m. by Krzysztof Kaźmierczyk (7.5k480103)
Hi , 

i need to upload a file to the RTC server. what i am trying to do is using http request POST , and post a xml file with all the required fields of the ticket.

i will use this prefix : rtc_cm:com.ibm.team.workitem.linktype.attachment.attachment , and then add the rdf:resource="The link of the file in the server".

i just need a way to automate the uploading of the file , and get a url to download it from the server.

Thank you.
Wasim.

2 answers



permanent link
Ralph Schoon (63.5k33646) | answered Oct 06 '14, 8:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Wasim,

if you hope for people to look at your question and spend their personal time on providing an answer, you want to provide a good title, and, if possible good tagging.
A good title could have been: "Uploading a work item attachment using REST API"

Having said that, there is as far as I am aware no published API for uploading an attachment to a work item. You can trace the communication and use the protocol that is used. Here is my current understanding on uploading attachments:
https://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/

I know others have figured the REST interface, but it is not published as far as I can tell and can change.
The post above will, at best, only make the uploaded resource available on the work item if you have a valid resource reference.

permanent link
Donald Nong (14.5k614) | answered Nov 18 '14, 7:51 p.m.
Only notice that this is an old post when I am about to give an answer. But anyway, the linked post has two methods included.
https://jazz.net/forum/questions/150849/how-to-upload-an-attachment-to-a-work-item-via-rest-api

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.