how to paginate through rest api json response from scheduled script

redth
Giga Expert

Hi,

We have a integration from servicenow to third party system through rest api and each time we receive 250 records in one payload and there are 20,000 records on the other end. How do i paginate to get all the 20,000 records. 

In the payload, I receive these attributes - total (total number of records in third party system) and count (number of records sent in one payload).

6 REPLIES 6

ersureshbe
Giga Sage
Giga Sage

Hi,

Can you refer below link for your reference.

https://community.servicenow.com/community?id=community_question&sys_id=bb563722dbf52850a08a1ea6689619e1

Please mark as correct answer if it helped.

Regards,

Suresh.

 

Regards,
Suresh.

Hi Suresh, I have referred the above link already. In my case, I need to get records from third party system. So, where do i define sysparm_limit and sysparm_offset?

@redth , we have the same issue. did you happen to find a solution to this?

Hi,  I recommend to check the REST API explorer the sysparm_limit you can add it. If you add it will amend in the url. You should share the URL to 3rd party.

 

ersureshbe_0-1669999712659.png

 

Regards,
Suresh.