Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time

Basic calls

# Ensure you can connect
# returns "pong!"

# Get all records in a table
# returns JSON array of records from 'Badges' table in 'Operations' base


# Getting a protected route w/o using an auth token
curl # or some other sensative data
# "ERROR: Tried to access table that is not in the allowlist."

# Lend your own Airtable API keys to get past the allowlist
curl -H "Authorization: Bearer VALID_AIRTABLE_KEY"
# returns JSON array of non-allowlisted records from airtable

Filtering, searching

# The "select" URL param can be used to pass arguments into Airtable's API. A list of optional parameters are show below with examples

# Get only 1 record

# Get all badges, sorted by the number of people who have earned them
curl{"sort":[{"field":"People Count","direction":"desc"}]}

# You can combine arguments too. Here we'll sort badges by the number of people
# and select the single record at the top of the list to get the badge with the
# most users
curl{"sort":[{"field":"People Count","direction":"desc"}],"maxResults":1}

# You can select specific fields to return to speed up queries/only see the data you want:

Developing & Contributing

git clone
cd api2/
pnpm install

# Run locally with nodemon
pnpm run dev
# Run tests
pnpm test

Development tools

# The `meta` url param will return a JSON object with metadata about the request you've just made
curl http://localhost:5000/v0/Operations/Clubs/?meta=true
# returns the following:
    result: [...], # Array of badges from Airtable
    meta: {
        duration: 241, # Time in ms to complete request
        query: {...}, # List of URL query params parsed by the server
        params: {...}, # List of URL params parsed by the server