Parameters in header and body of Rest call

0
Hi   I’m calling a Post Rest api, which is working fine I need to pass a body   example of body {   "user": {     "email": "user@mail.mu",     "password": "pass@2018."   },   "myToken": "@1pc35p9" }   I created a JSON structure using above example   The user need to input email and password   I created a microflow with a ‘Call Rest Service’ and configured above   How can i create 2 parameters, and pass it from the user input to the JSON structure in the Call Rest Service.      
asked
5 answers
0

Mohammad,

You can create an entity with 2 attributes, one for email and one for password.

Create a page with the entity on it.  When the user submits the page, call the rest microflow with the entity and use those attributes in your rest call.

Hope that helps,

Mike

answered
0

Hi

 

I created the entity and the page 

however, the page is as below. i presume i need to add a data view on the page, associating it to the entity

As such, on my Home page, when i create a button to call the new page, i get the following 

 

Kindly advise

 

Thank you

answered
0

Hello Team

 

I was able to proceed by creating a microflow doing a create object, then open page, and was able to call the microflow from the Home page

I am however still stuck with another issue

this is the entity having the parameters

i need email as {1}

 

how do i add the parameter attributes in the Template Parameter?

answered
0

Hi

I was able to make it work using $.  Thank you

 

As advised by Ahmad Zaatreh, i woukd like to test the export mapping

the json object has another object, user, inside it

{{
  "companyToken": "{3}",
  "user": {{
    "email": "{1}",
    "password": "{2}"
  }}
}}

I did the following, but could not proceed with the mapping

 

 

I was unable to map email and password

answered
0

Hi

Using an entity

 

how can i do an export mapping to the following JSON_Structure

{{
  "companyToken": "{3}",
  "user": {{
    "email": "{1}",
    "password": "{2}"
  }}
}}

All the 3 fields are already in my entity, but email and password are in another object ‘user’

 

So, my input parameter is entity NaveoLogin, and i need it converted to the Json structure using Export mapping.

 

 

answered