Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Pagination in API response

maliklalani
Kilo Explorer

Hi,

I am using Table API to fetch records from table. Maximum limit of records per response is 10,000 but I find no provision for pagination (URL to next page if maximum allowed records is exhausted).

Thanks in Advance,

- Malik

1 ACCEPTED SOLUTION

Also there is a description by Jose Valle here


Re: Using REST API with Servicenow


which may give a bit more insight...


View solution in original post

3 REPLIES 3

tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Malik,



I checked the documentation - below - and it seems that you are correct that there is no provision for pagination when the sysparm_limit is exceeded.



Best Regards



Tony



Table API - ServiceNow Wiki


sysparm_limitLimit to be applied on pagination. The default is 10000.

Unusually large sysparm_limit values can impact system performance.


sysparm_offsetA number of records to skip before returning records. Use this parameter with sysparm_limit for paging results. A number of records, specified by sysparm_offset are skipped before starting to count the sysparm_limit value. For example, if sysparm_limit is set to 500, but there are additional records you want to query, you can specifysysparm_offset=500 to skip the first 500 records and get the second set of records. Specifying sysparm_offset=0 is equivalent to omitting the sysparm_offsetparameter.

Also there is a description by Jose Valle here


Re: Using REST API with Servicenow


which may give a bit more insight...


Steve Arnold2
Tera Contributor