The recently released, in beta, Metadata API is a great start to a long requested feature by developers here. Providing programmatic access to a user’s base IDs/names is immensely helpful and should help simplify many development workflows.
One addition that I’m sure would be helpful for many developers is adding information and routes to tailor API requests based on a specific Airtable Workspace. While many users and organizations probably limit the number of workspaces they have based on features/pricing (e.g. have 1 Pro workspace where bases that need custom apps and scripting live, and have ‘N’ free workspaces to more logically group bases that don’t need pro features).
For my own account, a simplified version of the workspace I have access to is:
- Work (Pro account; bases relevant to all departments)
- Work (Free account; bases relevant to my specific team)
Many of the Airtable apps I develop are targeted towards workspace #1: the cross-cutting, company-wide bases and deal with referencing data from one base or another. To accomplish these tasks, I reference the base IDs in a separate “Directory” base that I can access programmatically.
The introduction of the metadata API should obviate the need for manually creating/updating this “Directory” base, as bases are added, changed, or deleted. However, being able to separate operations by workspace would be most helpful, even if just by work vs. personal workspaces at the simplest. Without being able to filter results, I see the utility of the metadata API to be limited.
Adding “workspaceId” data to base data returned by
- Perhaps the easiest change from a backend architecture perspective. As the docs note, “adding keys to response objects [is not considered] a breaking change”.
- API calls would still return all bases, but the caller could then filter the array based on
"name": "My first base",
- Would allow users to filter results and only request the data relevant to their needs.
- Would allow additional targeting of Apps, Scripts, and other Airtable integrations to bases in specific workspaces
"name": "My first workspace"
"name": "My first base"