Get All Records from an App: The Offset Method
Overview
This article introduces how to retrieve data of all records from an App using the Get Records API and the Offset Method.
Details of the Offset Method
The Get Records API is defaulted to retrieving up to 100 records. By increasing the limit parameter, this number can be increased to 500 records. To retrieve over 500 records, the Get Records API can be called recursively, using promises.
The Offset Method is one way of calling the Get Records API recursively. The Get Records API is called to retrieve a number of records equal to the value set in the limit parameter. The offset is then shifted, and the function calls itself again. This continues until all records are retrieved from the App.
Sample Code
Navigate to an App, and open the browser's developer tools. Type the following code into the console and run it.
|
|
Data of all records from the currently viewed App should be output into the console. It may take a few seconds before the result is displayed.
Limitations
The maximum value that can be set for the offset parameter is 10,000. If more than 10,000 records need to be obtained, consider other recursive methods or use the Get Cursor REST API.