REST API mapping

Our applications calls a REST API which returns a generic model. Is it a good idea that in the microflow, where the REST action is executed, we map the data from the first model to another model with non-persistable entities. That last model only contains the data needed to show in a datagrid or listview. Or does it create memory overhead when data is kept twice in memory but in different entities?
2 answers

Hi Olivier,

Here is a simple example of a string variable in the API, where it's converted to a boolean.


Another example where a date string is converted to an actual datetime attribute:

Let me know if you have any other questions!


Depending on how often the rest service is called, it shouldn't be too big of an issue. Once you are done with a non-persistent entity the garbage collection will remove it from memory. 

If you want to improve your performance you can set the import mapping method to call a microflow instead of creating an object. That way you can import the json to your second data structure.

Here is some documentation that talks about it


Edit: If you double click the grey entity in your mapping, it will open up the properties and this is where you can define this method.