Dynamic API Call

Hey Guys,

Im using Supabase to dynamically call the API and return values of a table.

I have 2 api calls
1 - Return tables names - Data
2 - Return table data - Action

My issue is - when I initalise the Bubble API call it generally returns only columns from 1 table - but the structure of the next table will be different?

the plugin does not know in advanced what the structure of the API call will be.

Hence when try to load data into the tables I only have a select few columns to choose from which are incorrect.

I want to avoid having to create an api call for every single table.

Surely somebody has faced this problem before

Yea you might have to do this :flushed:

You can set it up manually with all the possible return fields

Hey thanks for your reply.

Yes manual is one solution. I want to find out if there is a more dynamic way.

Hi @tylerboodman I believe we may need to choose the manual response for api and specify the columns.

I believe you were asking if a separate API call had to be created for each table. Therefore, I suggested manually aggregating all responses, which is still much more efficient and maintainable than a separate API call per table.

Hi @code-escapee so I manually mapped out each response with the method you recommended,

However im stuck at how I can aggregate the results into a repeating group of some sort.

reading the json is my biggest challenge. What would I need to progress through this? Each data source requires a single text but the JSON is returning a list? What am I doing wrong?