Glide Read Rows API

Hello all, I am trying to read all my rows out of a big table. This said big table has 20k rows, yet when i get the API JSON response fro all my rows in that table, I only get a response containing the first 10k rows. Is there any work around this?

Here is my code, written for run in google apps script:

function readGlideAppRows() {
var url = ‘https://api.glideapp.io/api/function/queryTables’;
var headers = {
‘Content-Type’: ‘application/json’,
‘Authorization’: ‘Bearer 006e44ef-39d3-4bb2*******’
};
var payload = {
“appID”: “zvDeo8IUE*******”,
“queries”: [
{
“tableName”: “native-table-ba0e1a5f-b661-4408-b38*********88”
}
]
};

var options = {
‘method’: ‘post’,
‘headers’: headers,
‘payload’: JSON.stringify(payload)
};

var response = UrlFetchApp.fetch(url, options);
var responseData = JSON.parse(response.getContentText());

console.log(responseData[0][‘rows’].length);

// Handle the responseData here
}

@Darren_Alderman

@Robert_Petitto

This is covered in the documentation.

In a case like this, the API response should contain a next parameter. You should make a subsequent call, passing a startAt value of whatever the next value was. Keep doing that until there is no next in the response.

Please note that filtered queries are now supported (Big Tables only), and the use of these is also covered in the docs.

2 Likes

Thank you so much!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.