Set up an API GET request for list page - Airtable

The Data Collections allows you to create API requests to any database or tool with an available REST API.

Here is how to create a GET request to retrieve data to be displayed in your apps.

You can utilise other API verbs (i.e. POST) to retrieve data if your API specifies otherwise. Simply change the verb type of the request URL.

Example Data

Use this Airtable example to get your data.

Example Airtable Database

How to create a GET request

1. In Data Collections, click Create a new collection and select Start from scratch. If you already have a collection, skip to step #3.

2. Enter the name of your collection and an optional description (we recommend putting the source as the description, like Google Sheet).

A Collection is a group of API requests, normally from the same data source.

Create a new collection
Add name and description to the new collection

3. You're ready to create requests! Click the + button to add a new request, then edit the request name to help you identify it.

Add a new API request

4. Input the GET request URL from the API of your choosing. (Or use the example request we listed above).

To obtain the API request URL in Airtable, do the following steps:

  1. Select Help from the top right corner of the screen.

  2. Choose API documentation from the Additional Resources list.

Airtable - API documentation
  1. Once the Airtable API for your base is open, navigate to the left-hand menu and locate the specific table, in this case, Cities table. Select "List records" to get information about the API and cURL.

Airtable's API documentation
  1. Copy the URL from Airtable, navigate back to Bravo, and paste it into the request URL field.

Add the API request URL

5. If the API has Headers or Parameters values you need to input in order to send the request call, input them in the section below. (The example request does not require any extra input).

If it require authorization do the following steps:

  1. With Airtable open, click on your account in the upper right corner of the screen. Here you'll see a dropdown menu appear. Click the Developer hub option. Or if you are currently signed into Airtable, you can click here to access the developer hub.

Add the Headers
  • Click Create token from the Personal access token tab.

  • Set a Name, for example: Bravo API key.

  • Click + Add a scope and select data.records:read and data.records:write. Make sure both are selected.

  • Click + Add a base and select All workspaces (you may select a specific base if you want).

  • Click Create token. Make sure you verified your email first.

  • A new modal shows up: Your token has been created. Copy the token.

  1. Go back to Bravo, add a header with key Authorization and value Bearer [API KEY] (replacing [API KEY] with your token).

6. Press Send. You will receive a response list of all the data retrieved from the API request. You have successfully retrieved data from an API! 🎉

How to select data items to use in your apps

In your response list under Received Data, you will see all the data items that the API request is sending over.

The text in light gray is the name of the data item. The text in green is text value of the data item, and text in pink is numerical value.

1. To populate data into a list in your design, first choose All from the dropdown menu. This selects the array (list) of data rather than one data record. For instance, in the example provided, there are 150 items. Selecting '0' will pick a unique data, the first one in the list; '1' will choose the second item, and '149' will select the last item in the list.

Selected data from received data

2. Next, tick the box next to the data items you wish to link to your app design. Selected data will be available for binding in Data Binding.

3. Under Output Variables, it lists all the data items you have selected and automatically denotes the one(s) that is an array.

  • Path: Is the internal path of the data item sent from the API. You can define a custom one if needed, if you know what you're doing.

  • Variable Name: The name to easier identifies the data item. It appears in Data Binding, and you may also edit this for certain request setups. Learn more.

  • Default Value: Is a sample content of the data item. This sample content will also be the placeholder content for any fields that come up blank. You can delete it if you don't want to override any blank fields.

Follow this guide to continue with the Data binding:

Bind data to design for a list page

Last updated

Was this helpful?