Question

Display weather from free API on PEGA ui

can someone provide mee detailed steps on how to display current weather conditions from any free API using connect rest in pega???

plz provide me the step by step detailed explanation how to show weather on my ui for a selected city

***Edited by Moderator Marissa to update platform capability tags****

Comments

Keep up to date on this post and subscribe to comments

Pega
April 18, 2019 - 3:09am

Hi , 

This is the weather API which you can use :

https://openweathermap.org/find?q=hyderabad every time you need to replace the city name while preapring your query and then Using fetch get the results.

The response you can use as :

${weather.main.temp}
${weather.weather[0].description}
${weather.name}

 

 

April 18, 2019 - 6:16am

sir can u provide step by step document how to use openweathermap to integrate in pega???

Pega
April 18, 2019 - 11:37am

Hi ,

Please follow the below link where you can find steps to create rest connector in pega.

http://myknowpega.com/2017/06/07/connect-rest-configuration-tutorial/

In place of endpoint URL , provide the weather api URL suggested by sahuv1.

Thank You,

April 22, 2019 - 12:44am

Im unable to implement it

I BEG SOMEONE TO PROVIDE STEP BY STEP PROCEDURE TO RETRIEVE WEATHER INFO USING CONNECT-REST.

Pega
April 22, 2019 - 8:27am

Hi,

Please find the steps below.

Go to Designer Studio -> Integration -> Connectors and click on Create REST Integration

Provide Name and endpoint URL(weather api URL)

Checkbox for dynamic value will get enabled if there is some dynamic property

Click next

Provide resource Name and click the checkbox for the method supported then next.

Provide sample response by clicking  on +Add a Rest response or +Add a fie

Then click on next.

Review all the data and click on create.

Once 100% get completed click on close.

Click on the datapage (D_servicenameyouhaveprovided)->action ->run->provide input value ->run.

See the result.

 

Thank You,

Pega
April 29, 2019 - 6:25am

Hi,

Go to Designer studio-->Integration--->Connectors--->Create Rest Integration

Enter below details.

1.Name:Enter the name of the system,Which you are going to consume the service.

2.Endpoint URL:(Your weather url that you want to consume).

3.Resource Path:It will be pre populated if you enter the complete url.

4.Headers:It is not required for you.

5.Authentication:If mandatory then select basic.

click Next

since you are fetching the reports so select GET method.

click Next.

Click on Add a rest response.

Run

Next

Finish.

PRPC will generate the required classes automatically.

Please let me know If there is any query.

Thanks,
Abhinav