RESTful POST Microservice

1
I want to create RESTful microservices using mendix. A mendix app will expose RESTful services and an another microservice (another mendix app) will interact with it and POST a JSON object in the server. Do I need to first get the data from the user in say a data_edit page in the microservice app and then call REST microflow accessing the http url of the first mendix service to POST this data parsed to JSON?
asked
3 answers
2

I am not sure if I completely understand your question but If I get this correct, the answer is no. You don’t need to have any page or whatever. Your rest services can be backend only if you don’t need any user edit pages (But it might be a good Idea to have at least some debug pages).

answered
1

You can send it in the body of your POST request. In the published service, you can configure an import mapping that is used to map your json to an entity in your domain model. In this example it is done with the account object.

You only need to have the object or the list of objects as parameter in your microflow and configure your rest service with the mapping.

answered
0

I am new to mendix and want to understand how can I use a mendix app just to POST JSON object onto another Mendix App (Service). Assuming the other Mendix app has exposed the REST services and my app will interact with it and POST the JSON object into the database of the first one.

answered