One Star

[resolved] HTTP / Rest Request & POST parameters with Talend

Dear Talend Community,
i'm trying to access a web API with tHTTPRequest which needs to parameters:

Parameter 1: requestJobDescription --> JSON formatted description
Parameter 2: template --> a freemarker template
The API documentation with an example can be found here:
However, i tried several variations of the example with Talend and it seems that i can get the first parameter running, but for the freemarker template i receive the message "No template submitted" or the file contains only "error".
I'm using a tHTTPRequest to send a request to the Endpoint with the Post Parameters from an file:
Content of Parameter File:
requestJobDescription={ "test":"true", "type":"file", "credentials":{ "partnerUserID":"xyz", "partnerUserSecret":"abc" }, "onReceive":{ "immediateResponse": }, "inputSettings":{ "type":"combinedReportData", "reportState":"APPROVED", "filters":{ "startDate":"2014-07-01", "markedAsExported":"Partner name" } }, "outputSettings":{ "fileExtension":"csv" }, "onFinish": }&template="<#-- Header --> Report ID,Merchant,Amount,Category,Expense Date <#list reports as report> <#list report.transactionList as expense> ${report.reportID},<#t> ${expense.merchant},<#t> ${expense.amount},<#t> ${expense.category},<#t> ${expense.created}<#lt>"
Perhaps someone of you might have a good idea/hint on how to solve the problem.
Thanks in advance!
Community Manager

Re: [resolved] HTTP / Rest Request & POST parameters with Talend

Have a try to remove the double quotes for the value of template parameter or remove the parameter names from the file to see if it works.
Bet regards
Talend | Data Agility for Modern Business