Need help to integrate API with Mendix

0
Hi All, I’m integrating an API with my Mendix App but i got this error when i set the End Point of Microflow.
asked
5 answers
2

The $country variable you use is an object of the type JsonObject. Not a list. 

You propably are trying to return the root object of the response you received from the api call at this moment. Don't know which api and dont know what import mapping you have, but i guess you have to do a retrieve first? Is there a relation between JsonObject and country? Some screenshots will help. 

answered
1

But you are not returning a list. $country is an object. Create a list add the objects you want to return and return that list. Note that a list could only contain one object. And the above screenshot alone is not very helpfull. Share a screenshot of your mapping.

Regards,

Ronald

[Edit]

When I look at your import mapping I see that you get one movie with a lot of movie ratings. If you expected a list of movies you are probably calling the wrong API. When you do the REST call you can set in the response to store the output in a variable. That will in this API call a movie object. You can then use that object to show it in a page and also show the list of ratings for that movie.

answered
0

Hi,

Are you trying to return a list or one object? You have a list type selected for JsonObjects but are calling $country instead of $JsonObjectList

answered
0

Here is my microflow

answered
0

here is import mapping screenshot

here is list screenshot

 

answered