S
S
SheetDream
Search…
Limits & Sorting
Your generated API will support limits and sorting for GET requests.
Limits can be used to only retrieve a small subset of records, or to introduce paging into your application.
Sorting can be used to perform server side sorts in ascending or descending order, on a particular field within each row.

Limits

Limits can be specified for any GET request against an API object by using the page and limit parameters.
For example:
https://api.plutodream.com/sheetdream/api/:your_project:/restaurantmenu?page=1&limit=30
The above would retrieve 30 records from the API object restaurantmenu. If I wanted to retrieve the next page of results, I would send the following GET request:
https://api.plutodream.com/sheetdream/api/:your_project:/restaurantmenu?page=2&limit=30
SheetDream would then grab the next 30 results.
There is no limit to how many records you can request. Requests made to the API object without specifying a page or limit will return all records. This is something important to keep in mind if you're dealing with a table that will hold many records, and you are displaying them on your website somewhere.

Sorting

Sorting can be specified for any GET request against an API object by using the sort and sort_type parameters.
For example:
https://api.plutodream.com/sheetdream/api/:your_project:/restaurantmenu?sort=Name
The above would sort by the Name field in the table in ascending order. By default SheetDream sorts by ascending order. If you want to sort in descending order, you would do the following:
https://api.plutodream.com/sheetdream/api/:your_project:/restaurantmenu?sort=Name&sort_type=desc
The above would return the results in descending order.
Sorting, combined with the advanced grouping functionality SheetDream provides in the HTML builder within the Embedding & Code tab, can give you very creative ways of presenting and representing your data on your website or application.
Last modified 10mo ago
Copy link