RTC:how to upload attachments to a workitem via rest api and use java code
i want to upload attachments to a workitem via rest api and use java code
i saw some resolutions use python language to resolve this problem,but i just want java code
so anyone can give me a example or tell me how to do this,please
|
Accepted answer
Ralph Schoon (63.6k●3●36●47)
| answered Oct 10 '20, 8:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Oct 10 '20, 8:45 a.m.
As far as I am aware, there is no documented REST API to do this. The Java API to do this is described here: https://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/
You can trace what happens when you do it manually and mimic that. The API would not be supported.
If you want to use REST APIs with Java, I am sure you can google that on other sites. You use a HTTP Client to do that. https://rsjazz.wordpress.com/2019/03/07/registering-custom-resource-intensive-scenarios-to-clm-applications/ leads to a Wiki article that has an example for doing the same thing with cURL and an HTTP client that is part of the EWM/RTC plain Java client libraries.
There are numerous Java HTTP client implementations and likely as many examples how to do a HTTPs request - which is what a REST call is.
Ralph Schoon selected this answer as the correct answer
Comments
tian ding
commented Oct 11 '20, 9:14 p.m.
thanks for your help brother,now i will have a try,thanks very much
|
One other answer
|
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.