Need Help - getting all records in the form in one API call

34 views
Skip to first unread message

Hemanth Suresh

unread,
Sep 23, 2022, 2:55:04 PM9/23/22
to Zengine Development
Hi,

I am using below API to get all the records in the form of workspace.

I am getting paged data (getting 20 out of 98 records). Response looks like this.
"status": 200,
    "code": 2000,
    "totalCount": 98,
    "limit": 20,
    "offset": 0,

Please let me know how to get all the records (98) in a single call.

Thanks,
Hemanth

Wes

unread,
Sep 23, 2022, 3:42:15 PM9/23/22
to Zengine Development
Hello,
Our developer site has a page with the available API querying options: https://zenginehq.github.io/developers/rest-api/conventions/querying-options/

In your case, you can use ?limit=100 to fetch all 98 records in 1 request.

Hemanth Suresh

unread,
Sep 26, 2022, 9:11:27 AM9/26/22
to Zengine Development
Hi,

Can this limit be more than 100? as per documentation provided above, it can be up to 100 only. But API is accepting 500 as well. Since we have only 98 records I am not able to confirm if the API can return more than 100 records.

Thanks.

Wes

unread,
Oct 3, 2022, 12:29:25 PM10/3/22
to Zengine Development
The records endpoint unofficially supports fetching more than 100 records. If you want to fetch 500 records to leave some buffer room for new records, that is fine. If you think that more records will continually be added, I would recommend keeping the number lower and using pagination. The API will tell you how many records there are so that you can determine how many pages need to be fetched.

The API will not error if you try to fetch more than is allowed. Instead, it will use its own limit value.
Reply all
Reply to author
Forward
0 new messages