How to make a API call where it needs to display the content on mendix page.

0
Hi , Get method and json structure  the information in the API should display the content on mendix page . Like there are two lines of content  in the API  ,on call of API it needs to display on the page ? Can anyone guide how we can do that ?  
asked
3 answers
1

Hello, 

From my understanding you want the consumed data (the response of the RestAPI) to be shown on a page.

 

In this case you need to do the following

  1. Create json stracture
  2. Create import mapping
  3. Create a page to display the data 
  4. Create a microflow to call the service

 

Just follow the instructions here: 

HowToRest

answered
0

Step1: Create a microflow and inside the microflow call the activity "Call REST"
Step2: Double click Call REST API activity, in the location load the URL, in the Respose tab map the import mapping 
Step3: After import mapping we get the JSON to Mendix object/list and pass that object/list to the page


Note: To create import mapping 
1.Right click the module and add a JSON structure of the API and click "format" it,
2.Right click the module and add a Import mapping in that click JSON and select JSON structure created previously

answered
0

hi Praneeth,

I have find this below example of wikipedia api, Its one of the best example to understand how we can fetch data through api.

https://docs.mendix.com/howto/integration/consume-a-rest-service

hope this will help you.

Thanks & Regards

 

answered