21
Views
6
Comments
Solved
There is no Email input parameter?
Question

Hi everybody, 

I'm following the tutorial on Becoming a Traditional Web Developer and I'm currently working on the Writing Data to a Rest API (POST and PUT) exercise lab (part: Update Contact User Interface).

In 2d), I created a Run Server Action and chose GetContact in the Select Action dialog. 2e) tells me to set the Email parameter to the Email input parameter of the screen, as shown below:


However, when I try to do this, there is no Email input parameter:


Does anyone know why there is no Email input parameter, and what I can do to solve this?

Staff
Rank: #1842
Solution

Can you check to make sure that the "GetContact" REST API method has "/employees/{Email}/" as the URL Path and that you added an input parameter to it with the name and data type of "Email"? 

The "{Email}" in the URL is where the input parameter is inserted when making the API call, and the input parameter needs to be defined for you to be able to set the value when you use the REST API method.

mvp_badge
MVP
Rank: #5

Hi lwvk1994

I am not aware of this exercise, but, when you consumed the Web service, you skipped something, as the input parameter should be part of the URL you gave in the DIALOG box where you defined the URL of the method...

Cheers.

Staff
Rank: #1842
Solution

Can you check to make sure that the "GetContact" REST API method has "/employees/{Email}/" as the URL Path and that you added an input parameter to it with the name and data type of "Email"? 

The "{Email}" in the URL is where the input parameter is inserted when making the API call, and the input parameter needs to be defined for you to be able to set the value when you use the REST API method.

mvp_badge
MVP
Rank: #5

Yes, on page 23: https://foundation.outsystems.net/ContactsAPI/rest/v1/contacts/{Email}/

If you missed the {Email}, the input parameter is not create.

Just delete the method and consume it again, with the correct URL, and it will fix the problem.

Rank: #533

Hi lwvk1994,


You missed {Email} input parameter while consuming, as @Eduardo said consume it again, it should work. let us know with result

Rank: #2059

Thank you all for helping me figure it out! I followed Chris' suggestion and I solved it. 

Staff
Rank: #1842

Glad you got it sorted out!