Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am trying to connect to sysaid API using Talend by passing parameters username and password to get Jsessionid as response by using POST method but I am not getting 500 status code error. But in postman when I pass endpoint url and providing un and pw in the body there I AM getting the SESSSIONID. i am not sure where I am making the mistake.
I will attach the screenshot for this. Please advice me how to go about this if I am wrong I am new to working on API.
Thanks
Hello @Lourd PEDDAKOTLA ,
There will be something wrong with the request body content or the settings of tRESTClient component.
Here is an article about Building a JSON document with tXMLMap to call a REST service which is similar to your case.
https://help.talend.com/r/en-US/7.3/esb-rest/trestclient-txmlmap-tfileinputdelimited-tfileinputdelimited-building-json-document-with-txmlmap-to-call-rest-service-standard-component
Hope it will be helpful for you.
if it doesn't help, it's recommended to use tREST component as instead, then you can setup HTTP header parameters and set the HTTP body directly, which is similar to what you did in postman.
Best regards
Aiming
Hi ,
Try using the tRest Component and pass the row in the body as a string of json.
I can refer these links for you:
https://community.talend.com/s/question/0D53p00007vCmbUCAS/post-json-with-rest-api?language=en_US
https://community.talend.com/s/question/0D53p00007vClxOCAS/call-trestclient-with-post-by-passing-json-body?language=en_US
https://community.talend.com/s/question/0D53p00007vCohzCAC/trestclient-post-json-body?language=en_US
Hope this helps.
Vader Out 💪.