Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am calling a REST API which has multiple input parameters and one of the input parameters is a file (CSV).
How can I load a file using tREST component?
rhall_2_0
I am very interested in how tFileFetch for uploading a file to an API
however the link you specified in your response is invalid
could you please either send me a new link or provide the necessary instructions on how to use this connector
you have always been helpful
thank you in advance
mjan100917
Hi @mjan100917,
I just tested the link and it works for me. I suspect that maybe the server was down when you tried it.
Regards
Richard
Hi,
The link http://talend.nl/talend-tech-tip-calling-a-rest-service-for-file-upload/ seems to be broken. Does anyone have the original post?
Best regards,
Olivier
Hi, is it not possible to uploading a (csv) file via HTTP PUT method using the tRESTClient component ? tFileFetch is deprecated in studio 7.3, so it doesn't seem very industrializable ...
You can upload files using the tRestClient, but there is not a standard "out of the box" way of achieving this. It very much depends on the API you are using. Some APIs require the file is converted to a Base64 encoding, some take the contents of the file and recreate the file on the server (usually when the file is just supplying data), others do it other ways. Then there are the different headers, etc, you need to configure. The only way I have ever managed to achieve this is by having access to the API, the API documentation and then configuring the tRestClient according to that. Sometimes I have also had to use some Java in order to get it working. This is not a flaw with Talend, this is a consequence of different implementations of how this task is achieved.