- Maximum 1000 records are retrieved on one API hit. This row limit per API call is in place to prevent timeout issues. When dealing with large datasets, exceeding this limit can lead to performance problems and result in timeout errors.
- User can use Limit and Offset parameters to fetch records above 1000 records.
However, to first fetch the total count of records available within a API, user can use below parameter:
Prefer: count=exact
So the number present after “/” against content-range field shows the total count of records in that particular API which can be used to set the last offset value.
Refer below screen shot for reference.
Assume you got the total count as 5000 for event_parts API. So to fetch the 5000 records from event_parts we will use the below API queries,
https://api.resilinc.com/v1/event_parts?limit=1000&offset=0
https://api.resilinc.com/v1/event_parts?limit=1000&offset=1000
https://api.resilinc.com/v1/event_parts?limit=1000&offset=2000
https://api.resilinc.com/v1/event_parts?limit=1000&offset=3000
https://api.resilinc.com/v1/event_parts?limit=1000&offset=4000
- Here limit states the number of records to be fetched and offset states the starting number.
- So each time user need to update the offset value to get further 1000 records.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article