67
Views
4
Comments
Solved
How to create rest api that receives a csv file
Application Type
Reactive, Service

Hi guys,

I need to create a rest api to expose a method that receives a csv file as parameter. I'm not sure about the best way to do this. The method should be put?  The parameter should be a binary? Any ideas? 

Thanks

UserImage.jpg
Kay Lun
Solution

Hi Pedro,

For expose the API for file, you just have to use EXPOSE REST API option in Service Studio, then set the method as PUT, and assign a Binary Data input parameter and choose to receive in Body. Below are some screenshots for your reference.

Hope this help.


UserImage.jpg
Pedro OLIVEIRA

Thanks Kay. It works!

UserImage.jpg
Alexandre Yip

Hi Pedro, 

Check this post, it is similar to your request 

https://www.outsystems.com/forums/discussion/39830/rest-put-binary-content


Hope that it helps you

UserImage.jpg
Pedro OLIVEIRA

Thanks Alexandre

UserImage.jpg
Kay Lun
Solution

Hi Pedro,

For expose the API for file, you just have to use EXPOSE REST API option in Service Studio, then set the method as PUT, and assign a Binary Data input parameter and choose to receive in Body. Below are some screenshots for your reference.

Hope this help.


UserImage.jpg
Pedro OLIVEIRA

Thanks Kay. It works!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.