How to upload file using REST API?
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
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.
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.