A directory is a crucial tool for organizations looking to effectively manage their resources. It provides a centralized database that streamlines processes and enhances communication, resulting in a more efficient and productive workplace.
Retool empowers users to work with their existing data sources and seamlessly connect to their Baserow database. With Retool, building internal tools becomes fast and easy. Teams can utilize Retool to create custom apps, dashboards, admin panels, and other internal tools for critical operations while conveniently saving and editing data in their Baserow database.
Baserow is a modern, no-code, and open-source database builder that enables users to create tables, manage data, and collaborate with others. By integrating these two platforms, users can effortlessly streamline their workflow and enhance data management. With Retool, you have complete control over your data as you directly work with your own Baserow databases.
In this tutorial, you will learn how to create a customized backend with the Baserow API. You can use an existing database to create a central data source within your organisation.
Baserow is an open-source database tool that offers a range of benefits to businesses, making it a powerful and flexible choice. With its scalability, security, customization, and versatility, Baserow provides a reliable platform for developing robust database applications.
Let’s get started!
First, we’ll create a workspace called 'Retool App’ on Baserow. On the Dashboard page where you can see an overview of all your workspaces and databases, click the + Create workspace button. This button will also be visible in the sidebar.
Next, we are going to create a database in the Retool workspace to store data. Click + Create new then select Database from the dropdown option. Input a name for the new database and click the From template option:
By using a Baserow database, all relevant employee information can be stored in a centralized location, making it easy to access and update as necessary. This can include basic information such as names, job titles, and contact information, as well as more detailed information such as job responsibilities, performance evaluations, and attendance records.
Before building your app, we’ll need some data to build with. Retool connects to all your databases and APIs, including our built-in database.
We need to authenticate with the database token before we can connect the data to Retool. Let’s begin with linking the Baserow account to authenticate the database token.
The user’s database access privileges are defined by the database token permissions. If you accidentally expose your database token to the public, we recommend that you generate a new one as soon as possible.
After you have created your database schema and API key in the settings, your Baserow database provides its own REST API endpoints to create, read, update and delete rows.
The database documentation is generated automatically based on the tables and fields in your database.
To get the API documentation, click on the vertical ellipsis ⋮ beside the selected workspace and select ‘View API Docs’ from the workspace menu.
Retrieve the base URL of the API you want to connect to, URL parameters, headers, etc.
Next, let’s add Baserow a resource to use in your Retool apps.
Log in to Retool and navigate to the Resources tab.
Resources let you connect to your Baserow database or API. A resource **determines how Retool connects to a data source. You can connect your Baserow database and make it available as a resource in your Retool organisation, allowing you to connect to any database or API.
Navigate to the Resource page. Click Create new > Create a new resource and select REST API to create a REST Query
resource.
Next, connect a resource, API authentication and pass URL parameters, headers, etc.
On the Connect a resource page, add your connection information.
https://api.baserow.io
for the hosted version or self-hosted URLAuthorization: Token YOUR_DATABASE_TOKEN
as a global header. All your API requests that use the resource will have the right auth headers sent over.After you enter your connection details, click Create resource and then Create an app to open the App editor.
After creating a resource for the data source you want to use with Retool. You can select the resource when writing a query so you can interact with the data.
Next, create an app to start building with your Baserow DB data.
For this tutorial, we’ll create a simple app. Add a table with the same columns/fields corresponding to our database. Next, we want to add databases to Retool and make them available to query.
We need to connect the resource with the data we want to read. Let’s test the list row endpoint retrieved from the API docs - https://api.baserow.io/api/database/rows/table/145505/?user_field_names=true
When the App editor opens, query1
is created automatically with the resource you added. You can see this in the Resource dropdown in the query editor.
POST
query1
with additional URL parameters, headers, etc. from the API doc - page
, size
, search
, order_by
, filter__{field}__{filter}
, filter_type
, include
, exclude
, view_id
.To query your API, click Save & Run.
Thanks to collaborative databases, you can establish communication across departments - marketing, sales, technical support, clients, vendors, and distributors.
You can create a secure web application that lets you choose which users can access the database. It’s easy to collaborate with data in real-time.
To invite collaborators to your workspace and grant relevant access:
⋮
icon in the right corner next to the workspace nameBaserow Advanced and Enterprise plans come with advanced user management to restrict access by assigning roles to users in workspaces, databases or tables. Roles permit users to execute operations as an Admin, Builder, Editor, Commenter, or Viewer.
This step-by-step guide on how to build a custom backend with the Baserow API can be adapted to create a powerful backend database for any app.
By using a database, all relevant employee information can be stored in a centralized location, making it easy to access and update as necessary. This can include basic information such as names, job titles, and contact information, as well as more detailed information such as job responsibilities, performance evaluations, and attendance records.
In case you’ve run into an issue while following the tutorial, feel free to reach out to ask for help in the Baserow community.
What’s your use case? Tell us how you use Baserow