Exposing a published rest service

Hello,  An external application we use has the ability to send updates to a web listener. The documentation I have found on this seems very specific to making data available from within the entities to external applications. But that is not what I am trying to do. I need to be able to accept data and run a microflow on parameters that come through a URL.  When we make an update in this external application it will send (to a web listener) unique values specific to what was updated so that I can then use a microflow to go and fetch the new data. Below is the information directly from the API documentation of the external application. I have an entity created that will hold this info being sent but I am unsure on how to do this. I would think the best approach would be to have those parameters as an input to a microflow where I can call the API using the parameters from the URL to get the complete data for the updated record. But, I would like to see the data from the parameters in an entity with a date and time so I can see how frequently we are updating.  Once the callback URL is setup, when supported objects has changed, we will make calls to the callback URL while passing a number of query parameters to your web service. The following query parameters will be passed to you. We might include additional parameters that’s not listed in this table in the future. connectionId – Type GUID  Provided by the shop user apiKey – Type GUID. Provided by the shop user type of object – Type string. The object type. id – Type GUID. The object ID. operation – Type string. The action that occurred. Supported object types today are: Contact, ServiceItem, WorkOrder. Operation that will be sent today are: Update, Delete, Invoiced. Update is set when an object is created or updated. Invoiced is only sent when a work order is posted as an invoice. A sample callback after a contact has been updated might look like: https://your_callback_url?connectionId=5fecbc200f0e4a7cbf41040e11047e56&apiKey=2de51c4fd0f04b9fabeb95225e87da70&type=Contact&id=3DC13A80-6EB1-4D3D-B784-1B42BE325B7E&operation=Update
2 answers

A published REST service is the correct way to do this, not a deeplink. Especially if you need to call a callback URL.

Assuming you already have an entity where you want to store all of the data you receive, create a message definition and an import mapping for that entity. 

Use this mapping on a published rest service, then the endpoint microflow that gets triggered will create the object and receive it as a microflow parameter. You can use it as you please and, when finished, send the callback request to the callback endpoint. You can start with the documentation here: https://docs.mendix.com/refguide/published-rest-operation 


If the parameters are being passed as a GET request with a query string as your example seems to imply, you may find it easiest to do this using a Deeplink in your Mendix application.


The microflow it calls can take the parameters as string variables and you can use them as you see fit in there.

Hope this helps.