Skip to content

Airtable/airtable_api_proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airtable API proxy demo

This demo sets up a simple API proxy that returns all records from Art Gallery template example and allows anyone on the internet to toggle whether a particular artist is on display.

In this demo, clicking anywhere on the artist row toggles "On Display?" checkbox in the base. You can play with a live demo on heroku.

This set up is useful if you'd like to provide read or write access to Airtable data w/o exposing your API key, adding your own caching layer so you're not limited by the rate limits, adding your own authentication and authorization and many more use cases.

To run the example:

Then run bundler to install all the dependencies

bundle

And start up the proxy with your API key and Base ID.

export AIRTABLE_API_KEY=keyA3f3...  # your API key here
export AIRTABLE_BASE_ID=app22ddr    # your Base ID here
bundle exec rackup -p 9292 config.ru

Navigate to localhost:9292 for your proxy server.

Running on heroku

Login to heroku

heroku login

Create an app

heroku create

Push your app to heroku

git push heroku master

Configure the app

heroku config:set AIRTABLE_API_KEY='keyASD' # Your API key here
heroku config:set AIRTABLE_BASE_ID='app33f' # Your Base ID here

Go to the app

heroku open

TADA!

You should see something like this:

example UI

Now when someone clicks on any record, it will toggle the "On Display?" field and update your Airtable base in real time.

Update example

Live demo

Live demo is hosted on heroku. Feel free to click around.

About

Example of proxying requests to Airtable

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published