Consume REST API - How to pass json as input to api

0
Hi, I am working on customized Login functionality. I have one REST API of login that i need to call on Login button. This API accept input username and password in json format like below   { "password": "string", "username": "string" } I created Export mapping for it. The microflow is as follow Root_2 is Export Mapping. Now I am confused. On Home page if i put two test boxes and one login button. When i enter these two values(username and password) and click login button the Rest API should called. How can i change the input username and password into json to provide input to Login REST API.
asked
3 answers
0

You have to do a create action. Then you can use the output of this action in the Call REST action.

answered
0

Still plenty to do:

- define your data model with an entity LoginAttempt having attributes Name and Password

- create a export-mapping

- call the REST-service using the exportmapping

- import the result, probably into a variable ‘CredentialsAreValid‘ of type boolean

This will help you out: https://docs.mendix.com/howto7/integration/consume-a-rest-service#1-introduction

answered
0

Microflow is as follow

answered