The query string (name/value pairs) is sent in the URL of a GET request

0
Hi Experts, My question is bit self explanatory, I need to pass query string in the URL for the GET request. I don’t know that how to start with this in Mendix, Can anyone please tell me that how can I achieve this in Mendix? Do I need to create any service in the backend for retrieving the data from the Mendix database using GET method? If Yes, then please tell me that how can I do that? Example: I need to pass a input parameter as query string in URL and need to get some data as a output according to that.     Thanks in Advance!
asked
2 answers
1

1.Create the JSON Structure
2.Create Import Mapping with the JSON structure created already
3.Call the rest service in the microflow
    In this activity you can pass the parameter to the URL
4.Apply import mapping in the call rest service activity 

Use the below link to completly know about the consume the REST

https://docs.mendix.com/howto/integration/consume-a-rest-service

answered
1

Before your ‘Call REST Action’  create a variable String ‘$varLocation”. Build your varLocation string based on the baseURL of the endpoint and add your queryParameters as needed. Then use your $varLocation in the Call Rest action. 

Something like so:

$baseURL + ‘?status=’ + $task/status + ‘&casemanager=’ + $employee/name

Your Task and Employee should be available in this microflow as parameters.

answered