Thanks, but I am not even sure where to start there. Not exactly a strong .js guy, but was able to follow a tutorial for vue.js to get info from my table. I see there is fetchNextPage(); but where would that go in my code now? I don’t want the user to have to click on anything to see the next record, I just want them all to be there.
Thanks, but I am not even sure where to start there. Not exactly a strong .js guy, but was able to follow a tutorial for vue.js to get info from my table. I see there is fetchNextPage(); but where would that go in my code now? I don’t want the user to have to click on anything to see the next record, I just want them all to be there.
I am not seeing that this question was answered (using Node.js and HTTP GET to paginate)
I have gone through every response, and nothing here is useful, that answers the question in those terms.
Looking at the article: “How to paginate records in Airtable when using the API” is not helpful. It is not directed at using HTTP GET and pagination.
Even if the answer were not specific to Node, but just GET, and params, would be sufficient.
I cannot map anything the article mentioned to the API examples given in the API documentation on how to paginate.
In addition the article is not a fully functional working example, it is missing pieces that would make it functional, and those pieces are essential in understanding a working example.
I have an axios GET call to fetch the first 100 records successfully (or up to 100 using the param: ?maxRecords=100)
There is nothing that I can see in the response that indicates an offset to use on the next call.
Where do I get the offset? ( I need it for the last response, to specify how many to get? )
How do I know when there are no more records, when doing repeated GET’s?
So the question is:
Is there a fully working example anywhere (axios / node), using GET to paginate, fetching all records from a table (100 at a time, until there are no more)?
A good example, using axios.get to loop, and process each batch of 100 when it comes back, would be extremely helpful.
Thank you,
This question is still open, without an answer:
I am not seeing that this question was answered (using Node.js and HTTP GET to paginate)
I have gone through every response, and nothing here is useful, that answers the question in those terms.
Looking at the article: “How to paginate records in Airtable when using the API” is not helpful. It is not directed at using HTTP GET and pagination.
Even if the answer were not specific to Node, but just GET, and params, would be sufficient.
I cannot map anything the article mentioned to the API examples given in the API documentation on how to paginate.
In addition the article is not a fully functional working example, it is missing pieces that would make it functional, and those pieces are essential in understanding a working example.
I have an axios GET call to fetch the first 100 records successfully (or up to 100 using the param: ?maxRecords=100)
There is nothing that I can see in the response that indicates an offset to use on the next call.
Where do I get the offset? ( I need it for the last response, to specify how many to get? )
How do I know when there are no more records, when doing repeated GET’s?
So the question is:
Is there a fully working example anywhere (axios / node), using GET to paginate, fetching all records from a table (100 at a time, until there are no more)?
A good example, using axios.get to loop, and process each batch of 100 when it comes back, would be extremely helpful.
Thank you,
here is a good starting point, the only thing missing is what the for loop would look like, how to exit.
console.log('fetchCount:', fetchCount); // print final # records fetched
};
If there are improvements upon this in any way, whether it is directly related to the Airtable API or with Node (code or structure, async/await), or any other issues, please share.
Output:
fetchCount: 0
fetchCount: 100
fetchCount: 200
fetchCount: 300
fetchCount: 400
fetchCount: 500
fetchCount: 600
fetchCount: 700
fetchCount: 800
fetchCount: 900
fetchCount: 1000
fetchCount: 1024
Hi all, now airtable return in the respond with the first 100 records with an offset, just used it to the second call with an async function
console.log('fetchCount:', fetchCount); // print final # records fetched
};
If there are improvements upon this in any way, whether it is directly related to the Airtable API or with Node (code or structure, async/await), or any other issues, please share.
Output:
fetchCount: 0
fetchCount: 100
fetchCount: 200
fetchCount: 300
fetchCount: 400
fetchCount: 500
fetchCount: 600
fetchCount: 700
fetchCount: 800
fetchCount: 900
fetchCount: 1000
fetchCount: 1024
Indeed, it cannot be an integer mapping to sequential record items because Airtable supports Queries by View and as you know, views can contain all sorts of filtering, ergo, it requires a logical mapping of data, not a numerical mapping.