Hey All,
I maintain a fork of one of the R packages for manipulating data in Airtable and have run into some issues while trying to create a function that uses POST to handle extremely long queries or queries with more than 22 fields and the offset values to retrieve a table with more than 100 records.
See package here: https://github.com/ecohealthalliance/airtabler/tree/master
The function in question is this one: https://github.com/ecohealthalliance/airtabler/blob/master/R/air_post.R
When using POST, the offset param seems to have no effect.
The offset ID changes with each request. So if i have 600 records, the first offset id is "itr72y1g3QhvFAKE1/rec9RPMSRlQrWVyum", then the second is l ""itr72y1g3QhvFAKE2/rec9RPMSRlQrWVyum" etc. Only the Offset ID (the bit that starts with `itr`) changes, not the record. By contrast, with GET requests, only the record ID changes.
here is an example of the body of a post request:
{ "offset": ["itr72y1g3QhvYZw5Y/rec9RPMSRlQrWVyum"],
"fields[0]": ["1 - Some Longish String of Text"], "fields[1]": ["2 - Some Longish String of Text"], "fields[2]": ["3 - Some Longish String of Text"], "fields[3]": ["4 - Some Longish String of Text"], "fields[4]": ["5 - Some Longish String of Text"], "fields[5]": ["6 - Some Longish String of Text"], "fields[6]": ["7 - Some Longish String of Text"], "fields[7]": ["8 - Some Longish String of Text"], "fields[8]": ["9 - Some Longish String of Text"], "fields[9]": ["10 - Some Longish String of Text"], "fields[10]": ["11 - Some Longish String of Text"], "fields[11]": ["12 - Some Longish String of Text"], "fields[12]": ["13 - Some Longish String of Text"], "fields[13]": ["14 - Some Longish String of Text"], "fields[14]": ["15 - Some Longish String of Text"], "fields[15]": ["16 - Some Longish String of Text"], "fields[16]": ["17 - Some Longish String of Text"], "fields[17]": ["18 - Some Longish String of Text"], "fields[18]": ["19 - Some Longish String of Text"], "fields[19]": ["20 - Some Longish String of Text"], "fields[20]": ["21 - Some Longish String of Text"], "fields[21]": ["22 - Some Longish String of Text"] }
There is nothing in the List Records API documentation that says POST requests can't be offset.
https://airtable.com/developers/web/api/list-records#