call REST with POST method

0
hi team ,  i have to use call rest activity with post method  and below is my body = {                 "token": "string",                 "data": {                     "question": "string",                     "answer": "string"                 }             }   this is my microflow  and i want response in jSON
asked
4 answers
0

If you set the operation to POST, you can provide the body in the Request tab. Easiest way is to select "custom request template" and paste in your body example. You can use variables to add dynamic data.

 

In the next tab, Response, you can specify what you want to do with the result, for example saving the response in a string variable. This will allow you to show it on a page.

 

image.png

answered
0

You'd normally use an Export Mapping to convert your data into a JSON structure that you'd use in your Call REST action. You'd also use an Import Mapping to map the response back to Mendix entities.

 

There is a good worked example in the Mendix Academy that runs through exactly how to do this.

 

https://academy.mendix.com/link/modules/138/lectures/5198/Learning-Objectves

 

I hope this helps. Good luck!

answered
0

I tried this option, but I got this error 

 

"brace should be followed by a number of digits or another brace mendix"

 

I can't find a possible reason on the web for this error, I don't see any typo either.

 

Any ideas?

answered
0

Hello Everyone, I'm new here and just have some days of experience working with Mendix.

 

I'm facing an issue where my Data Grid is not displaying any results when using a Microflow as the data source.

Here’s what I’ve done so far:

  • The microflow runs without errors and should return a list of objects.
  • I’ve checked that the microflow retrieves data correctly when tested separately.
  • Security settings seem to be fine—my user has access to the entity.
  • The Data Grid is correctly set to use the microflow as its data source.

However, when I run the application, the Data Grid remains empty.

Has anyone faced a similar issue or knows what I might be missing? Any help is greatly appreciated!

Thanks!Screenshot 2025-02-17 at 22.50.52.png

answered