# Set up an API GET request for detail page - Airtable

{% hint style="info" %}
Remember that you can use the [Airtable API Wizard](https://docs.bravostudio.app/connect-api/set-up-api-requests/api-wizard-importer/airtable-using-the-airtable-api-wizard) to automatically set up the GET requests for list and detail page. Also, if you want to import an API definition (Open API, Swagger or Postman), you can do that with the [import wizard](https://docs.bravostudio.app/connect-api/set-up-api-requests/creating-an-api-collection).
{% endhint %}

This tutorial is a continuation after setting up a GET request for a list page. If you haven't done that yet, check out:

{% content-ref url="set-up-an-api-get-request-for-list-page-airtable" %}
[set-up-an-api-get-request-for-list-page-airtable](https://docs.bravostudio.app/connect-api/set-up-api-requests/creating-an-api-collection/airtable/set-up-an-api-get-request-for-list-page-airtable)
{% endcontent-ref %}

Here is how to set up a **GET request** to display content based on the list item you clicked in the previous app screen.

## How to set up GET request for a detail page

&#x20;1\. In the collection where you already created the GET request for the list page, **add a new request** and **edit the name** to help you identify it.

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXpqEanvOhm8vMtIH8i%2Fuploads%2FWB0KiU79wOjlZ9jcZVgB%2FSend%20form%20input%20to%20a%20database.jpg?alt=media\&token=fad2d746-6250-44af-acd0-848a58d4dd01)

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXpqEanvOhm8vMtIH8i%2Fuploads%2FB4uSr1cDpkmrsHcAEOMk%2FSet%20up%20an%20API%20GET%20request%20for%20detail%20page.jpg?alt=media\&token=52ed793e-8555-48f9-a926-b0b029e95a44)

2\. **Paste the URL for a detail page request.** This type of request will return a single record of data, from the data list we obtained in the [list page request](https://docs.bravostudio.app/connect-api/set-up-api-requests/creating-an-api-collection/airtable/set-up-an-api-get-request-for-list-page-airtable). In this example, we need to add `${id}` to the base URL, to get a specific data record. In our countries API example, this will be data about a single country.&#x20;

<figure><img src="https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXpqEanvOhm8vMtIH8i%2Fuploads%2FqRcOMepPJlByxacXvkDL%2FSet%20up%20an%20API%20GET%20request%20for%20detail%20page%20(1).jpg?alt=media&#x26;token=22080fb0-c02d-4bf3-aa54-56bc414fd7f5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXpqEanvOhm8vMtIH8i%2Fuploads%2FL6kxfQ8PhmmgCWI3m2KZ%2FSet%20up%20an%20API%20GET%20request%20for%20detail%20page%20(2).jpg?alt=media&#x26;token=cb1ca7c5-ef8c-432d-bd5e-5f1ca1a6dcd3" alt=""><figcaption></figcaption></figure>

In this URL, `${id}` will be a **variable** that Bravo will use to get a specific record from the list fetched with the [list page request](https://docs.bravostudio.app/connect-api/set-up-api-requests/creating-an-api-collection/airtable/set-up-an-api-get-request-for-list-page-airtable). We'll show in the next step how this binding between requests is done.

Then, in Input Variables and Test Values, insert the Variable Name (id) and the Test Value (recId3UHf32o1Az5E) provided in the Airtable retrieve records.

{% hint style="info" %}
Check out [this video](https://www.youtube.com/watch?v=PLcgXR1OoAc) to learn more about Bravo variables.
{% endhint %}

3\. Now, we'll go to the list GET request we already set, and indicate the data item that will take the `${id}` variable. Hit `Send`, and under **Received Data, select the data item `.data.records[].id`**. This is what we use to link the detail request to the list request.

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXpqEanvOhm8vMtIH8i%2Fuploads%2FqxN4gv8YOiF3WiQUxDew%2FSet%20up%20an%20API%20GET%20request%20for%20detail%20page%20\(3\).jpg?alt=media\&token=6b35bb10-9075-49f9-a138-120b1595e22c)

4\. Go to **Selected Data**, **change the Label** of the data record ID to `id` (case-sensitive) so that it matches exactly what we added in the detail GET request.&#x20;

{% hint style="warning" %}
Make sure the spelling of the `Name` in the `Selected Data` section for the data item matches exactly the spelling of the corresponding variable in the detail request URL. Otherwise, the binding won't work, and **you'll most likely get an error message** when testing the app on Bravo Vision.
{% endhint %}

5\. Press `Send`. You have successfully set up the detail GET request if **receive a response** under Received Data.

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXpqEanvOhm8vMtIH8i%2Fuploads%2FHtG3TzIBcpE3AeF5ig0d%2FScreen-Recording-2024-07-02-at-12.00.39.gif?alt=media\&token=f18e7c24-8fba-40b4-a9ed-f69c17dc2959)

{% hint style="warning" %}
If you encounter any error message, screenshot it and send it to us from the **Help widget** at the bottom right corner (for **Solo & Teams** **users with Advanced and Business add-on**) or post in the [Bravo community](https://community.bravostudio.app/home).&#x20;
{% endhint %}

{% hint style="danger" %}
Be careful when selecting data related to media information (images and videos). Sometimes, the media metadata (including URL) comes wrapped in a single-item list from the API response. In order to display the media file correctly in the app, in the "Received Data" tab, check if this metadata comes inside a single-item list. If so, select this single item of the list (0 index), and then select the individual data (media URL, media title and so on).
{% endhint %}

Here's an additional example using Airtable:

{% embed url="<https://www.youtube.com/watch?v=I01hwRmK4DE>" %}
