How to setup a database and generate APIs

To get started, follow below steps:

Step 1: Create a new database

Once logged in, create a new database on your dashboard. Enter the details like database name, table, column, type of column and then click Add.

After few seconds, your API endpoints will be generated for your above database.

Step 2: Generate Secret Key

Once the APIs are generated, the next step is to generate a secret key for your database. This is a critical step, and without this you will not be able to access the generated APIs.

Simply, click on Generate Secret Key. It will take you to the Secret Key page. Here's you access your past keys, if any.

Click Generate button. And in a few seconds, you will have access to a newly generated Secret Key, as below.

Step 3: Open the Dynamically Generated API Documentation

Click on the button below the secret key to access the auto generated API documentation for your database. It contains all the endpoints as per your designed database. Here, you can test out your APIs by creating a new record, updating a record, deleting a record and fetching all the records.

Step 4: Test your APIs

Lets test one of the endpoint from the doc. Lets try creating a new record via the API.

Simply expand the POST endpoint, and click 'Try out'. Enter your secret key and inside the body, type the book name we want to create.

Click 'Execute'. And our new record will be created. You can see the response as success.

Similarly, you can try testing other endpoints as well. The final step is an optional step to copy the curl command generated for your API operation. This can be used to test the APIs in postman.

Step 4: Copy the CURL command

When you perform a certain action like POST or GET, etc., you will see a CURL command getting generated. This can be used to integrate the API with any 3rd party that accepts curl as an API path. In our case, we performed POST request in the last step. Hence a curl command for POST has been generated below. You can simply copy this and use in tool like Postman, bubble.io etc.

Last updated