Help

Re: Get record clickable link with ID and Base API

1121 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Michal_Lew
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi guys!

I’m running an Order Management System with Airtable and I run into the 50 000 limit quite often. My solution is to make a copy of the entire table and clean the main table from most of the copied records.

This solution is quite effective but as I have many of these copies there is a problem where my team needs to find an archived record.

For this I have created a multibase PHP search that works quite well - but I don’t have any way to generate a clickable link to these record.

What I have:

  • I have the base ID that I’m searching
  • I have the record ID

What I need:

  • An https link that opens the record in Airtable so that my team doesn’t have to open the table manually.

Is it possible to generate a clickable link while having a base ID and the record ID - or do I need anything else?

I’m writing the script in PHP.

Thanks for any help - much love to everybody ❤️

5 Replies 5

The url for a record is always:

https://airtable.com/[tableID]/[recordID]
or
https://airtable.com/[tableID]/[viewID]/[recordID]

Hi!

Thank you so much for the answer.
Is the [tableID] the same ID that I use to connect to the API via PHP (the same that is at the top of each table API documentation?)

And is the recordID the record that I get in [“id”] in the main array of each record?

Thanks once more

My answer is “yes?” to both questions. As far as I’m aware, IDs are consistent, there wouldn’t be another ID associated with a table, record, view, etc. that you’d pull from the API.

Michal_Lew
5 - Automation Enthusiast
5 - Automation Enthusiast

It doesn’t work :frowning:

An URL that I get from the SCRIPT - combination of “base ID” and “record ID” looks like this:
https://airtable.com/apphQ62Wk2Cfp88hh/rec5LQvWRXP4ZkUpM

But the URL for the same record inside AIRTABLE looks like this (when I open it):
https://airtable .com/tblqVQvwluIjWBA6W/viwHb4vuFMRGz6F8n/rec5LQvWRXP4ZkUpM?blocks=hide

So the Record URL is there but I don’t know how to get these 2 numbers from the API:
tblqVQvwluIjWBA6W
viwHb4vuFMRGz6F8n

Please help :slightly_smiling_face:

As I said, you can get a working URL without the viewID (which always starts with viw). The baseID is prefaced with app, the tableID is prefaced with tbl.

If you can’t get the table ID with the regular API, you probably have to use the Metadata API, which is in beta at the moment : https://airtable.com/api/meta