Hi Ryan,
I was able to import and show this data. This is how I did it…
Firstly, create the JSON structure from that example data at http://dummy.restapiexample.com/api/v1/employees
Next create an Import Mapping for this JSON data
I had Mendix create the domain model for me automatically from the JSON data.
From this data you can create a page. The data starts at Root, so you need that in a Data View, and inside that you need a Data Grid to show the JsonObject list by association from the Root.
Now you can download the data and show it in a page using a simple microflow. In the response make sure you apply your import mapping and return the Root as a variable, I called mine $vRoot. You pass that as the parameter to your Show Page action.
When you run that microflow you should get the data back like this…
Hope this helps!
Hi Ryan,
I was able to import and show this data. This is how I did it…
Firstly, create the JSON structure from that example data at http://dummy.restapiexample.com/api/v1/employees
Next create an Import Mapping for this JSON data
I had Mendix create the domain model for me automatically from the JSON data.
From this data you can create a page. The data starts at Root, so you need that in a Data View, and inside that you need a Data Grid to show the JsonObject list by association from the Root.
Now you can download the data and show it in a page using a simple microflow. In the response make sure you apply your import mapping and return the Root as a variable, I called mine $vRoot. You pass that as the parameter to your Show Page action.
When you run that microflow you should get the data back like this…
Hope this helps!
Do you want the errors displayed in a Datagrid*) or those thousands of employees? And what is you question? You seem to be trying to consume a REST API that returns the employee data.
If the returned error message is your question, then ask the publisher to explain the errormessage. Either personally or by checking her documentation.
If the returned data seems empty, then that is probably because during processing the REST-call’s response, the big part of the data is stored in the database and you only have the object Root in memory. Do a retrieve by association from object Root to get the data.
*) a Datagrid contains multiple objects, a Dataview contains only one object