How to configure the Call REST Service activity in Mendix to include JSON in the request body?

0
I am trying to integrate with another system using the Call REST Service activity in a Microflow. To learn the basic usage of this activity, I am testing the POST method with a sample Web API (https://jsonplaceholder.typicode.com/guide/). However, when I include JSON in the request body, I encounter a system error and the request fails. Could you please guide me on how to configure the Call REST Service activity in Mendix to achieve the same functionality as shown in the following process? Let me know if you need further adjustments!
asked
2 answers
0

Hi Tomohiro,

this should work:

Screenshot 2025-05-16 at 09.56.23.png

Screenshot 2025-05-16 at 09.56.30.png

Screenshot 2025-05-16 at 09.56.37.png

Please note the double opening braces {{ in the request template. This is to ensure that it's not picked up as a parameter. 

Hope this helps.

 

 

answered
1

You would usually use a JSON Structure to define you data structure, and then use an Export Mapping to convert the data in your application to that JSON format. 

 

The Mendix Academy learning path on Import and Exporting data has a section on Importing Data Consuming REST Services, which covers exactly what you need.

 

https://academy.mendix.com/link/paths/44/Importing-and-Exporting-Your-Data

 

Good luck!

answered