Help

Overriding view filters in Airtable API

1053 1
cancel
Showing results for 
Search instead for 
Did you mean: 
david_swain
4 - Data Explorer
4 - Data Explorer

We have an Airtable base called “Prokit Events” that is a collection of running and cycling events and races around the world. We sync the Airtable base with a Wordpress website called Prokit via the Airtable API.

We just realized that what we thought were internal view filters we have on in Airtable also determine what our users are able to search for on our site when they search for an event to add to their profiles (you can see this by clicking the add event button on Prokit).

Is there a way to have the API always return all entries we have set to Live on Airtable and override whatever view filters we have on? Or other solutions that would allow us to continue to work on the Airtable database without impacting what our users are able to see?

1 Reply 1

Hi @david_swain - when you use the Airtable API to list records in a table you specify the table and the view:

https://api.airtable.com/v0/YOUR_APP_ID/Inventory?maxRecords=100&view=YOUR_VIEW_NAME

It sounds like you’ve got a view or views that you use to do your work in Airtable, but this isn’t the same set of data you might want to show on the website, e.g. you’re working on live and not live events, but only want to show live events.

The answer here is to create a new view of live events only and query this view via the API. This way only the current live events will show and old or upcoming events will be filtered out.

JB