This page covers some key information you need to know about using the Budibase Public API and our OpenAPI 3.0 specification. The Budibase API provides access to resources including applications, users, tables and data through a RESTful API - allowing for much deeper integration with your business use cases.
Public API Reference
This article covers the important general points about the Budibase Public API, if you are looking for in-depth information about the individual endpoints please check out our API Reference.
The Budibase API requires an API key be specified as a header, specifically the
x-budibase-api-key header. Each user will have their own API key which can be generated through the Budibase portal, you'll find this in the user dropdown menu in the top right.
The "View API key" will open a menu, that allows generating a new API key (this will invalidate your old API key), from here you can copy your API key and start using it!
Data-related endpoints will require an
x-budibase-app-id header. Your App's ID can be retrieved by accessing your app from the Budibase dashboard, and locating your App ID from your browser's address bar after the URL's
<hostname> could be
<your-app-id> could be
Data-related endpoints in the Budibase API may call for a
rowId. Your desired Table ID can be retrieved by accessing your app from the Budibase dashboard and then navigating to the "Data" editor. The Table ID can be found in the address bar after the URL's
Table ID example:
<table-id> could be
While browsing database tables, you can retrieve a row's ID by locating the value under the row's
ID column. You may have to toggle "Auto columns" in order for the
ID column to be visible.
The Budibase Public API has been defined using the OpenAPI 3.0 specification which allows for easy integration between external applications and Budibase. You can learn more about the OpenAPI initiative here.
You can find the specification for the latest release of Budibase through our Github repository.
Insomnia is an open-source REST API client for developers. To import the Budibase API Collection first choose the Insomnia root element as shown below:
We want to import a collection from a URL so choose the Create button, then URL as shown below:
Paste the URL below into the dialog box, then choose Fetch and Import
You will be asked how you would like to import the collection. Choose New as shown below:
Next choose Request Collection
Then OK to confirm the import succeeded.
To view the imported API collection choose the collection name as highlighted below:
The next step is to personalise your environment variables to match your Budibase installation. Choose the OpenAPI env drop-down menu, then Manage Environments
Amend the values for each variable, entering the API key you obtained from your Budibase installation.
With the environment variables set you can try making some requests. The example below shows a request to Search for applications. Amend the value of the name string (set to inventory in this example), then choose the Send button to view the result.
To generate code for this request choose the drop-down arrow beside Search for application, then choose Generate code, then choose your preferred language from the top-left menu.
The Budibase OpenAPI specification makes it easy to use Budibase with Postman, you can import the Budibase API as a new collection. With Postman open choose the "Import" button at the top-left. Choose Import via link and paste the following URL:
Choose continue and you should see a new collection as shown below.
All that you need to do to this is adjust a two parameters about the API, the authorization to input your API key and the host (by default the collection will link to the Budibase Cloud, but you may wish to target your own self hosted Budibase instance). These settings are changed within the collection settings, click the three dots icon on the Budibase API collection, then click "Edit" - see the open this opens below.
First go to the "Authorization" tab and adjust the "Value" of the API key header to be that of your own API key. Then go to the "Variables" tab and change the "Current value" of the
baseUrl variable to be wherever the Budibase instance you wish to target is hosted; make sure that the
/api/public/v1 on the end of the URL is maintained, this is required to access the Public API.
Updated 5 days ago