Rest API returns Success with Content (Empty)

0
Hi everyone, i'm facing the following problem: The api returns success but the Content returns null, when running the api in Postman or event in the browser it returns the structure with the correct data. Has anyone experienced this? I'm using the Import Mapping.   (Also tried to use Create an object instead of find by key)
asked
5 answers
0

What are your settings in the Response tab of your Call REST service activity? If you set "response handling" to "do not store in a variable" your $latestHttpResponse variable will also have empty content. At least choose "Store in an Http response" and use that for your import mapping, or choose apply import mapping.

answered
0

Try setting the REST Consume lognode to TRACE. This will log the contents of the request and response so you can see what the API is returning. It could be the web service is returning a 200 success code but no content.

 

Good luck!

answered
0

Most of the time when you see nothing but expect to see some data the problem is security. Are you allowed to see the objects? Double check also your security.

Regards,

Ronald

 

answered
0

add a header Content-Type = application/json to the call

answered
0

Making this comment just to let you all know that i fixed the problem.

 

Basically i just remaked everything single step, the problem seemed to be on the mapping part since i changed the response output to "Store in a HTTP Request" and it returned the correct data, from this point i just deleted everything that was related to the api and created everything from scratch and everything worked as it.

When creating the mapping from the first time i didn't pressed "Map Automatically...." and this time i did, everything worked perfectly, so the problem probably was this small part.

 

I want to thank you all for the help, and hopefully this case will help someone in the future.

answered