Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to send data from a JSON file from Talend with REST API.
To verify that my file and my POST URL is working, I did the test on Postman without error, it allows to create new object in my tools.
I need it to work since Talend, because it will be industrialized later but I can not do it.
Here the contents of my JSON file:
"{
"path": "/Catalogue_Produits/Respiratoire/",
"elements": [
{
"type": "input",
"value": "Respi test 1 RESTAPIxxxx",
"name": "Denom",
"language": null
},
{
"type": "input",
"value": "RESPI test 1 RESTAPIxxxxx",
"name": "Nom_Data",
"language": null
},
{
"type": "select",
"value": "NouveauProduit",
"name": "PROCESSUS_SEL",
"language": null
}
],
"className": "Product",
"parentId": 98,
"key": "Respi3000",
"published": true,
"type": "object"
}"
Here the test ok on Postman:
I am new to Talend, but I tried to add the components:
tFileInputJSON => row => tRest_Client
The setting must be wrong because it does not work.
Can you help me ?
Thank you
are you passing the row value to tRest? Show me a screenshot of that component
Your HTTP Body is empty, you should be passing the value that is sent from the tFileInputRaw. See my first Screenshot:
Where 'row1' is the row leading from tFileInputRaw and 'content' is what represents the content of the file. (Clicking the row itself, then the component button will let you see what the schema is defined as)
@evansdar, it's work !!
Thank you
tREST does not seem to accept an input. Is there a setting that needs to be changed to enable?
I followed all the steps mentioned above but I am still getting the following error.
Invalid JSON body.|400
[statistics] disconnected
The setup of the job looks as follows
Can someone please advice or help me out?
Thank you in advance