Hello everyone,
I’m building an app that picks data from Airtable. All the listed APIs expect the table name as an input.
I’m looking for an API to get a list of all the tables in a base. Is there any API, or any workaround for this?
Thanks
Hello everyone,
I’m building an app that picks data from Airtable. All the listed APIs expect the table name as an input.
I’m looking for an API to get a list of all the tables in a base. Is there any API, or any workaround for this?
Thanks
The Standard REST API does not have a method for getting all of the tables in a base.
If you want to use code to get a list of tables, you can use the Scripting block to get the list of tables and have Scripting block store that info in a regular table. Then you only need to code the single table name in the code that accesses the Standard REST API. You would need to remember to click the run button for the script whenever the table names change.
Eventually, the Standard REST API might have access to metadata, but for now we have to resort to workarounds.
If this answers your question, please mark this post as the solution. Otherwise, could you please give a bit more details?
This is now possible!
Read about it here: https://airtable.com/api/meta
Simply make a GET request with the auth header, and see the tables listed:
https://api.airtable.com/v0/meta/bases/$BaseId/tables
This is now possible!
Read about it here: https://airtable.com/api/meta
Simply make a GET request with the auth header, and see the tables listed:
https://api.airtable.com/v0/meta/bases/$BaseId/tables
this is not working. im getting error…"{“error”:{“type”:“NOT_FOUND”}}"
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.airtable.com/v0/meta/bases/appxKxxxxxxxxxmDs/tables');
$headersb] = 'Authorization: Bearer keyPxxxxxxxxxDjIK';
$headersb] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$result = curl_exec($ch);
curl_close($ch);
this is not working. im getting error…"{“error”:{“type”:“NOT_FOUND”}}"
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.airtable.com/v0/meta/bases/appxKxxxxxxxxxmDs/tables');
$headersb] = 'Authorization: Bearer keyPxxxxxxxxxDjIK';
$headersb] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$result = curl_exec($ch);
curl_close($ch);
Have you been approved for the meta api beta?
This is now possible!
Read about it here: https://airtable.com/api/meta
Simply make a GET request with the auth header, and see the tables listed:
https://api.airtable.com/v0/meta/bases/$BaseId/tables
This is not working . I have “{“error”:{“type”:“NOT_FOUND”}}” in responce instead list of tables.
As I understand it, you have to request a specific token to use the Metadata API.
Here is the link : Airtable Metadata API Waitlist
I hope they respond quickly…
Very sad you cannot just use the meta API…
Very sad you cannot just use the meta API…
If you need access to your Airtable metadata, check out On2Air Schemas
If you need access to your Airtable metadata, check out On2Air Schemas
Wow that looks expensive just to fetch the tables in my base lol
Wow that looks expensive just to fetch the tables in my base lol
yeah maybe if that’s all it did. :star_struck: It also displays formulas, shows field dependencies, shows history changes, shows field options, and creates metadata snapshots.
yeah maybe if that’s all it did. :star_struck: It also displays formulas, shows field dependencies, shows history changes, shows field options, and creates metadata snapshots.
Yeah it looks amazing but I don’t need all of that unfortunately!
Yeah it looks amazing but I don’t need all of that unfortunately!
Totally understand!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.