How to create Import Mapping for a array of n number of Ids

0
Hi Team, I'm creating an API to get the details related to multiple Ids. Since the input data would be huge we have created a POST endpoint to handle the incoming data in JSON body object. The request was intended to look like this : {     "Ids": [         "1",         "2",         "3"     ] } here Ids can be in a range between 1 and n. But the import mapping is not able to handle such structure. Eventually I ended up creating an incoming request like this. Here my input mapping is a list of Ids. In this was I can map every element to the request. [     {         "Id": "1"     },     {         "Id": "2"     },     {         "Id": "2"     } ] The main drawback of this approach would be the huge amount of data which would be sent across the network due to extra attribute for each Id. Can you suggest a better approach so that the request JSON would look less bulky like intended. {     "Ids": [         "1",         "2",         "3"     ] }
asked
4 answers
2

Here is the Sample JSON struct

 

here is the Sample mapping when creating:

Here are the entities that created automatically. Note that Wrapper Entity, do not change it’s name

 

Here is the microflow to read get the data. in the microflow, I created a simple api which returns

it returns a list, which you could use in in list view

answered
0

Hi Vipul, Niharika how did you resolved this issue?

answered
0

Hi Vipul, How to solve this problem? I have also encountered it

answered
0

Hi Vipul Negi,

 

Try to debug and see does service actually returning any data. Or debug the data source microflow of list view to see more details.

For Debug microflow refer below learning path,

https://docs.mendix.com/howto8/monitoring-troubleshooting/debug-microflows/

 

Hope this helps!

Thank you.

answered