Prerequisites

HTTP connectors in Tulip are a powerful tool. They are, however, an advanced topic and require an understanding of RESTful APIs and JavaScript Object Notation (JSON). Contact Tulip Support if you need assistance setting up HTTP Connectors for your company.

The Goal

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:

Connection Details

Running On

Host

  • Enter api.openweathermap.org. This is the domain only, do not include http:// or https:// or the specific endpoint path.

Port

  • 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.

Headers

  • 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.

Next Steps

Now that we have the connector defined, the next step will be to write the connector function. See Part 2 to continue.

Did this answer your question?