💾Set up API requests

A tool's API is the way it can talk to another system, in our case, Bravo and your app. Check out these tutorials on how to set up API requests in Bravo to communicate with external tools.

Bravo can be connected to any API, as long as it is accessible on the Internet. This way, it's possible to create apps using any third party service of your choice to store and process the data.

Create API Collections

The API Collections section in Bravo is where you set up groups of API requests.

For example, If you want to display a list of items from your Google Sheets in your app, you first have to retrieve the data by setting up a GET request. Then, Bravo receives the data from the request and it's ready to be connected to an app design.

The Dashboard of the binding section provides a centralised location for doing the request and received data.

1. Collection Information

Collection Name. Here you can see the name of the collection that you are using. Collection settings: General: Name, Description (url) Authentication: Type (None, Basic, API Key, Bearer, Use settings from application (OAuth2)

2. Request section

You can add a request through this button. You can select the kind of request that you want. Request option: Get, Post, Put, Patch, Delete, Head Place the Url of the request Headers Query Parameters Body Pagination Input Variables & Test Values Send the request

3. Received Data section

Received Data: Select data to bind to the UI and/or use in another API request. Output Variables: Manage the Output Variables configuration. Debug & Inspect Response

Collection Information

1. Collection name:

2. Collection settings:

General: Name, Description (url)

Authentication: Type

None

Basic

API Key

Bearer

Use settings from application (OAuth2)

Request section

1. Add request

2. Request options

Get Intended to retrieve data from a server and do not modify the server's state.

Post Used to send data to the server for processing and may modify the server's state.

Put Used to create a new resource or replace a resource.

Patch Does partial update.

Delete Deletes the specified resource

Head Is a type of HTTP request that is identical to HTTP GET, except that the server will not return a message-body as part of the HTTP response.

3. Request URL

4. Headers

Here, you’ll set the parameters for the header of the HTTP request. This is used for authentication purposes, among others.

5. Query Parameters

Set of parameters attached to the end of the url.

6. Body

Here, you’ll set the body content of the HTTP request. Not all HTTP requests have a body. Usually, the ones sending data to the server (like POST or PATCH requests) do have a body. There are several formats in which data can be included in the body, some of the most common ones are JSON and plain text (raw). Similarly to the request URL, the body can include request variables.

7. Pagination

Pagination is the app mechanism to “load more itmes”. This is recommendes when your app needs to load content from a large database. Learn more about pagination.

8. Input Variables & Test Values

In case you’re using request variables in the URL or in the request body, you need to set temporary values for those variables before sending the request. These values will be sent to the API endpoint in the request URL, and will only be used in the test requests you perform from Data Library. When using your Bravo app, you’ll need to bind the request variables with API data.

Received Data section

1. Received Data

This panel will display the data received from the API request, after clicking “Send”. You’ll be able to select the data you want to bind to the UI elements, and the data you want to use in other API requests.

2. Output Variables

In this panel, you can specify a name for the data received from the API. This name will later appear when binding the UI elements with this data. It can also be used in other requests as a variable (in the URL or in the request body), in the case where those requests are linked to this one. For instance, a request for a detail page showing information for a particular item in a list.

3. Debug & Inspect Response

In this panel, you can see the content of the HTTP request and response, after clicking “Send” in the request URL panel to send a test request to the API. You might find this useful for debugging pursposes. If the HTTP requests is successful, a 200- OK status code will be returned from the API, together with the data. If there was any issue with the HTTP request, an error code will be returned from the API.

Types of API requests

Connect to any API: GET request for lists (retrieve data)

Connect to any API: GET request for detail page

Connect to any API: POST request (create data)

Connect to any API: DELETE request (delete data)

Using the Airtable API Wizard

Last updated