Sed JSON data in Rest API

0
how can we json data to any api {     "OutletCode":"TAB",     "MobileNumber":"9871216587"      }
asked
2 answers
0

You will need an API endpoint that accepts data in the format you mentioned, know how you can access or be authorized to call that API (maybe via token or basic authentication etc) and set headers required for it.

Once that is known take a look at the below documentation/video from Mendix:

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

https://video.mendix.com/watch/LxzKESFzqsrvNcGCY5YHCg

answered
0

if you want to expose a table with 2 columns as a GET API, you can create ‘Published REST Service’ , how to do that is in the learning path

if you want to consume ‘an api’ that gives you back this JSON as a response, then inside your microflow (which is the category of this question) you use the ‘Call Rest Service’ action, proper steps would be:

a fun way to do this:
in folder in studio pro: create JSON structure 
copy paste above JSON there
in folder in studio pro: create import mapping
in import mapping, select just created JSON structure as source
create (manual or automatic) the object for the mapping
inside your microflow you use the ‘Call Rest Service’ action with the import mapping as the response.

 

answered