I have a table/sheet that has a field that links to records in another table (parent/child).
When I use the REST API and do a HTTP GET (url, params, headers), and look at the response, the only thing I see in the field with the link is the AT record identifier like:
[ 'recPKTGm6EPiDoS6g' ]
No data from the linked record is present.
I have searched all over the response, and I do not see that there is enough information to use this AT record id to get the data of the record it refers to.
------------------------------------------------------------------------------------------------------------------------
In the UI, if I click on the field in the sheet, I get a popup that shows the full record (all data fields), and clicking on the down arrow next to the key at the top, I can see an option: “Copy Record URL”, and it looks like this:
https://airtable.com/tblPlziY7QNosBG3N/recPKTGm6EPiDoS6g
And so I see there is a uniform URL format for referencing a record with that URL.
https://airtable.com/<at_table_identifier>/<at_record_identifier>
------------------------------------------------------------------------------------------------------------------------
With the REST API, I want to have access to the AT table identifier in the response, and along with the record identifier that I get in the same response, I want to do another HTTP GET, and get that record (data), in JSON format to parse and use.
Even with the table identifier, (If I manually copied it, made a note of it, and put it in my code), I’m not seeing, that along with a record identifier, I can do a GET with the REST API, and get the data.
There is nothing in the Airtable REST API documentation that indicates that linked Record data can be obtained.
------------------------------------------------------------------------------------------------------------------------
Any help, actual working code would be appreciated.
I realize there may be a way to do this with the Node SDK, and I will give this a try next, but I am exploring for the moment how to HTTP GET the data, as we have a specific use case for constructing a URL that links to specific a record, and having that for our use case.
------------------------------------------------------------------------------------------------------------------------
If I copy the URL I get from the record, and paste into another browser tab, the data/pop up is there.
So therefore there must be a way to obtain this through GET, but I do not know what the headers or request would look like to do this, as the URL does not include: https://api.airtable.com
, but rather just:
https://airtable.com/<at_table_identifier>/<at_record_identifier>
------------------------------------------------------------------------------------------------------------------------
How, with a first request, do I get the <at_table_identifier> in the first response, and use that to do another GET after constructing this URL?