API integration without storing that data into mendix database.

0
I wanted to show the data in a datagrid from the API but I don’t wanted to save that data into the mendix database.Please help me to do the same with either a good documentation or your project...
asked
3 answers
1

It depends on, how you are consuming the REST service. If you are consuming it in background via scheduled event or something, then it is not possible.

If you are opening a page and wanted to consume the REST service there, then

  1. make the datagrid use datasource as Microflow
  2. using the JSON, create import mapping and entities required. NOTE: entities must be non-persistent
  3. consume REST service, with the JSON returned by API and import mapping, create your objects for entities
  4. return the created list in the datasource

NOTE: you can also follow similar approach, from the action microflow, where you do all processing and the list must be associated with one parent non-persistent entity. This parent object can be passed to the page and in this case, the datasource for datagrid will be association.

You can follow this for all HTTP Methods

answered
0

You can check out the documentation about REST services, there it is shown how get data from an API using JSON and using non-persistent entities: https://docs.mendix.com/refguide/integration/consume-a-rest-service/

answered
0

Hey

It can be easily done by consuming the intended API and displaying it in grid through data source microflow.

Read more here 

https://forum.mendix.com/link/space/databases/questions/99977

answered