REST API returning list

0
Hello , I want to call an API that I developed, this API returns a list of assets, how do I do this on Mendix ? Thanks in advance
asked
2 answers
0

Did you develop the api in Mendix or do you want to call the api from Mendix.

answered
0

Hi Aalaa,

Here is a good how to on how to consume a rest service. If you create a json structure from an example json string from the api that you want to call, you can use the import mapping to Store the response. The import mapping will return an object, and from there use the retrieve by association activity to retrieve the list.

https://docs.mendix.com/howto/integration/consume-a-rest-service

 

If you are trying to publish a rest service that returns a list, here is a how to guide on how to publish a rest service. It will be the same concept as above but you will use the export mapping activity to generate your json string.

https://docs.mendix.com/howto/integration/publish-rest-service

 

Hope this helps!

 

answered