Connecting to Budibase

Budibase is a low-code app-building platform that helps developers create responsive web applications with access methods to databases, APIs, and much more. You can connect a Cube deployment to Budibase using Cube's REST API.

Here's a short video guide on how to connect Budibase to Cube.

Don't have a Cube project yet? Learn how to get started here.

Click the "How to connect" link on the Overview page, navigate to the REST API tab. You will see your connection credentials, the REST API URL and the authorization token:

For a Cube instance publicly available at a specific HOST, the REST API URL would be HOST/cubejs-api/v1. Please refer to the REST API page for details.

You will also need to generate a JSON Web Token that would be used to authenticate requests to Cube.

Please check the Security page to learn how to generate a token. We suggest generating a long-lived JWT that won't expire soon.

Create a new "REST API" data source in Budibase.

Next, add a "Authorization" header for the REST API. Copy and paste Cube's Authorization token.

Click "+ Add Query".

Copy and paste the Cube REST API, including the /load path, in the API field. Make sure to select "POST" as the request.

Get your Cube query in the JSON query format ready. You can copy it from Cube's Playground or compose manually:

Paste the JSON query in the Body as "raw(JSON)". Make sure to add a query parameter for your JSON query.

Edit the Transform to return the data of the request.

return data.data

You can also give the query a name. In this sample it's called OrdersByMonth.

Lastly, click the "save" button and hit "send" to test the API and get a response back.

Move to the Design section and open the Components.

First, add a Data Provider. Select the query from above. In this sample it's called OrdersByMonth.

Add a chart into the data provider. Next, configure the data provider for the chart. Make sure it's set to the data provider you just created.

Then, you set the "label column" and "data columns". In this sample you can set Orders.createdAt as the label column and Orders.count as the data columns.

You'll see a nicely rendered chart show up.

Did you find this page useful?