Forum Academy Marketplace Showcase Pricing Features

Is it possible to pull only certain columns/fields using API

Hello,

I was under the impression that when using an API it pulls in the entire row with each call. I was just told that it is possible to pull in only certain columns if desired, so I went looking. I found the following post regarding Airtable, which coincidentally was what brought up the topic. I experience very slow performance when trying to pull in data from some AT tables that are full of calculated fields.

Is this correct? If so, can it be done through Bubble? I’ve been using the Bubble Airtable plugin.

image

Thanks,
George

Nobody knows…but me. :unamused:

I’ll have a go at helping because of your sad face :slight_smile: . It’s just helping you interpret that documentation really, which may or may not be helpful to you. I am guessing the AT plugin you mention doesn’t have a helpful argument like “List of fields you want to be returned” :slight_smile:

Any capability to conditionally alter the returned API call payload will be API dependent, it’s not something API’s do as a general capability.

It looks like AT does support filtering the returned fields to a named list of fields. :white_check_mark:

You pass that named list by adding the correctly formatted list to the REST API URL for AT :white_check_mark:

That format is "fields[]=xxxx&fields[]=yyyyy&… " but URL encoded :white_check_mark:

So if the was the Bubble API connector it would be easy to add these extra fields as parameters to the REST API URL. So I would say, if there isn’t that capability to do it through the existing plugin you are using, then it would be possible with the Bubble API connector.

Maybe all this is just completely obvious to you, in which case just ignore this. :+1:

1 Like

Thank you for all that information. I’ll give it a go. I haven’t used bubble’s API connector to connect to Airtable yet so it may take me a while to figure it out.

Does pulling in a small subset of fields significantly improve performance?

Thanks,
George

Improve performance - probably yes but by how much is impossible to say. It will reduce the network payload, and possibly (no way of knowing) decrease the processing time on the API server end.

If the AT plugin is pulling back lots of images, files etc (just lots of bytes - it is likely to make a material difference by not returning these).

The API connector is pretty well documented, will help you with lots of other Bubble problems, so worth persevering with to learn :+1:

2 Likes

@lindsay_knowcode Thanks again!

1 Like