In this example we will be building a Tulip App to display the temperature for different cities around the world by querying data from openweathermap.org, a free API for weather data.
NOTE: In order to use openweathermap.org, you will need to sign up for an account. After doing so you will be provided an API key. This key is necessary for connecting to the API.
Configuring the Connector to Communicate with an API
First, review the overview of HTTP connectors to get familiar with the layout of Connectors.
Then, create a new Connector called "Weather" and click "Add Connection Details".
Here is what the details should look like:
- Choose Cloud Connector Host. This is the most common hosting type. Refer to How do I Setup a Tulip Connector Host? for more complex configurations.
- Enter api.openweathermap.org. This is the domain only, do not include http:// or https:// or the specific endpoint path.
- Leave default value, TLS will dictate the port (see below)
TLS (Transport Layer Security)
- YES if https, NO if http. In this case we will use No.
- Leave as None
Test Connection and Save
After filling in the details as listed above, click Test to verify it is working. If it works, click Save.
Now that we have the connector defined, the next step will be to write the connector function. See Part 2 to continue.