Highlighted
Absent Member.. Absent Member..
Absent Member..
258 views

How to Adding files via RESTfull API?

 

Hi Experts,

How to Adding files via RESTfull API?  

Best Regards,

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: How to Adding files via RESTfull API?

I'm sorry, I don't understand your question.  What are you trying to do?

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: How to Adding files via RESTfull API?

@Youngs,

Here is an example to upload an attachment to an incident by curl restful call:

curl -XPOST -H "Content-Type: text/plain" -H "Authorization: Basic ZmFsY29uOjE=" -H "Content-Disposition: attachment; filename=test.txt" -d "this is an text attachment" "http://localhost:13941/SM/9/rest/incidents/IM10002/attachments"

And you need to enable the attachment like described in the help document:

http://helpserver.hpeswlab.net/SM9.50_codeless/Content/webservicesguide/reference/restful_tab_field_definitions.htm?Highlight=restful%20attachment

http://helpserver.hpeswlab.net/SM9.50_codeless/Content/webservicesguide/rest_syntax.htm?Highlight=restful%20attachment

Let me know if it helps,

Ling-Yan

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.