Skip to main content

External API Response in Data Table without Storing Data

Make an API Call

1. Create a REST API for GET Call

Go to External API page and create a REST API. Name the API, add the External API URL and select GET as call action.

DrapCode Builder Response in Data Table

2. Send Request & Receive Data

Scroll down and click the Send Request button. As you click the button, data will get recieved.

DrapCode Builder Response in Data Table

3. Process Response

Tick the checkbox to process the received response.

DrapCode Builder Response in Data Table

4. Select Collection Mapping without Persisting Record in Database

As we are trying to display data without saving it in the database, select the option,Collection Mapping without Persisting Record in Database.

DrapCode Builder Response in Data Table

5. Response Data Mapping

Scroll down and fill required field to map the data. Then, click the Save Setting button.

DrapCode Builder Response in Data Table

Add & Configure Data Table

6. Bind the External API

After dropping a data table in a page, open its settings and select the option, "Get Data from External API Response". Then, select the external API that you have created previously.

DrapCode Builder Response in Data Table

7. Preview or Publish

Save the changes and open the page in the preview or publish mode. You will see all data is displayed but there is no data in DrapCode's database.

DrapCode Builder Response in Data Table

How to Add Data to Database?

1. Go to REST APIs

Open the REST APIs page and click the edit icon to update the API settings.

DrapCode Builder Response in Data Table

2. Select Save Response Record in Database

Now as we are trying to display data whilst saving it in the database, select the option, Save Response Record in Database.

DrapCode Builder Response in Data Table

3. Reload the Published/Previwed Page

Reload the page that you opened in the publish or preview mode. Then open the collection bound to the data table.

As you can see in the image below, data is reflecting the database.

DrapCode Builder Response in Data Table