Create a REST API table with a source filter
Use a query parameter in a public GET endpoint URL to create a virtual table for a specific subset of records.
Use a source filter when the provider documents a query parameter that returns just the records your team needs. For example, if a station API supports a region filter, create a virtual table for the central region. Mainbase keeps the full endpoint URL, including the query value, and uses it when reading the table.
Set the endpoint and check the response
- In workspace settings, open your REST API connection. From its actions menu, select Create Virtual Table.
- Under Configure Endpoint, put the provider’s full filtered URL in API Endpoint URL and set HTTP Method to GET. For example,
https://api.example.org/v1/stations?region=centralillustrates how the filter goes in the URL. Use your provider’s actual parameter name and value. - In Discover Data, select Analyze API Response. Check Sample API Response for known records from the intended region. If the response wraps the records in an object, set the data path to the records array, then analyze again.
- In Preview Data, check the endpoint shown and compare a few rows with what you expected. If the sample contains records from other regions, verify the exact query parameter and value with the provider before continuing.
Use a publicly reachable endpoint on the same API origin as the saved connection. For example, a response that works on localhost from your browser is still unavailable to the connector. Keep credentials out of the endpoint URL and use query values that can be saved with the table.
Create and verify the filtered table
- In Map Fields, enter a distinct Display Name, such as Central region stations, and keep any field you’ll use to verify the filter, such as the station ID or region.
- Under Create Table, select Create REST API Table. Open the resulting table and check known records against the preview or the publisher’s filtered response. The same filtered URL on the same connection can reopen an existing table, so use that table if you already set it up.
For another region, repeat the workflow with the provider’s other filter value and give the resulting table a name that identifies its subset.
Ask Mainbase AI
Ask about any feature in Mainbase. Find a setting, get step-by-step guidance, or troubleshoot a problem.
Open the AI assistantCopy a question to get started
- How do I create a Kanban view?
- How do I invite a teammate?
- Why is a record missing from this view?