[SOLVED] Add request body to API call Mendix (Postman)

0
Hello,  I work with mendix for 3 months after work now so i’am stil learning! I think my question is not that hard, but i cant find it… :(  I use Postman to test al my API calls (POST / GET etc.)  Problem: Now i have an external application where i need information form, but its sending more information that i wanted (deleted users etc.)  The API works but with the extra information (Import). I figured out on google that i can ‘filter’ the information in the body in Postman, i did that with succes in Postman.  How do i do the same in Mendix? (MAIN QUESTION) Bodytext in postman: {"staticCriteria":[{"Property":"CompanyName","ExactMatch":false,"Value":"de kok bouwgroep","Selected":false,"HitCount":0}],"specificStaticCriteria":[]}   My API call till now in Mendix:  Microflow   HTTP Header   Request    Import mapping i think i need to do something in the request tab but i cant figur it out… :(  Thank you for you're help!      EDIT (Filled in the request tab)  When i put in the same body as in postman i get errorcode CE0712 – Brace should be followed by a number of digits or another brace  Body {"staticCriteria":[{"Property":"CompanyName","ExactMatch":false,"Value":"de kok bouwgroep","Selected":false,"HitCount":0}],"specificStaticCriteria":[]}   SOLUTION!!!  I needed to put a extra { therefor mendix will escape the left braces with another leftbrace.  So what i have now is: i maked the change with CRTL+B  {{"staticCriteria":[{{"Property":"CompanyName","ExactMatch":false,"Value":"de kok bouwgroep","Selected":false,"HitCount":0}],"specificStaticCriteria":[]}   Hopefully this will help someone in the future to! :)   
asked
2 answers
1

You just have to add the same body that is in postman in your request tab. 

So here : 

{"staticCriteria":[{"Property":"CompanyName","ExactMatch":false,"Value":"de kok bouwgroep","Selected":false,"HitCount":0}],"specificStaticCriteria":[]}

 

answered
-1

Hi,

Check the below url to add request body to REST call

https://docs.mendix.com/refguide/call-rest-action.

 

Thanks,

answered