I have GA version 5.4.1
I need to send csv file to REST API
I created a project:
ReadCSV, WriteJson, POST Json to REST
2 issues:
1.My rowset loos like this in the json file
com.linoma.ga.projects.tasks.converters.csv.CSVRowSet@58dce226
2.POST command returns success but no files were sent..
Below project XML.
Thank you for you help
Code: Select all
<project name="send csv to REST" mainModule="Main" version="2.0" logLevel="verbose">
<module name="Main">
<readCSV inputFile="\Import\IC230-testanna2.csv"
outputRowSetVariable="currentfilecontent" fieldDelimiter="comma" version="1.0">
<data>
<column index="1" />
<column index="2" />
<column index="3" />
<column index="4" />
<column index="5" />
<column index="6" />
<column index="7" />
<column index="8" />
<column index="9" />
<column index="10" />
<column index="11" />
<column index="12" />
<column index="13" />
<column index="14" />
<column index="15" />
<column index="16" />
<column index="17" />
</data>
</readCSV>
<jsonWrite outputFile="\Import\jsonoutput.json" whenFileExists="overwrite" outputFileVariable="filetoporcess" version="1.0">
<object name="{">
<field name="Protocol" value="AnnaTest6" />
<field name="FileContents" value="${currentfilecontent}" />
</object>
</jsonWrite>
<restPost resourceId="Test_rest" uri="DIC230011/api/UserSiteImportTest/" inputFile="${filetoporcess}" contentType="application/json" responseBodyDestination="none" responseHeadersDestination="none" version="1.0" logLevel="debug" disabled="false">
<header name="x-apiKey" value="12365478" />
</restPost>
</module>
</project>