How to return list of objects from published REST service in Mendix?

0
I have created the Get operation to return list of objects. But it says you should define export mapping and So i did.               Now it is giving me the following error:   If I choose to return list of Dform from microflow, then it says you should define export mapping. On creating export mapping , it gives error that Export mapping do not support list.  
asked
2 answers
0

Hello,

Looks like your export mapping is incorrect, refer this documentation  https://docs.mendix.com/howto/integration/publish-rest-service/#export-mapping

 

answered
0
  1. Try to create a Message definition
  2. Add Dform entity and the attributes you want to export 
  3. Create export mapping from the Message definition [to avoid any errors in creating export mapping manually]
  4. From export mapping, select the Dform entity for export and from select elements, select attributes once again for export
  5. In the MF, retrieve Dform and return it at the end.
    1. Alternatively, you can also do the export mapping from within microflow and attach the JSON generated to the Httpresponse body

 

answered