This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Configuring OpenWeatherMap Operations

To use the OpenWeatherMap connector, add the <openweathermap.init> element in your configuration before carrying out any other OpenWeatherMap operations.

The OpenWeatherMap API uses token-based authentication with the API key. For more information on authentication, see http://openweathermap.org/appid.

init
<openweathermap.init>
    <apiUrl>{$ctx:apiUrl}</apiUrl>
    <apiKey>{$ctx:apiKey}</apiKey>
    <apiVersion>{$ctx:apiVersion}</apiVersion>
</openweathermap.init>
Properties 
  • apiUrl: The URL of the OpenWeatherMap API.
  • apiKey:  OpenWeatherMap API key that you got when you registered your application.
  • apiVersion: The  version  of the OpenWeatherMap API.

Now that you have connected to OpenWeatherMap, use the information in the following topics to perform various operations with the connector.