how to paginate through rest api json response from scheduled script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 08:24 AM
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).
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 08:30 AM
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.
Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2022 08:35 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2022 07:18 AM
@redth , we have the same issue. did you happen to find a solution to this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2022 08:48 AM
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.
Suresh.