How to read 2398 records in multiple REST API GET calls
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 05:29 AM - edited 06-15-2023 05:31 AM
Hi All,
I have a requirement to read 2398 records in a GET call from a third party(IIQ) table, but they have a restriction that at a time only 500 records can be read. PFB URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 05:41 AM
if they are supporting pagination you can do this
1) first make an API call to know the total count
2) then divide it by 500 so that you get to know how many times you need to hit the API
Example: if you get count as 1800 then it means you need to do 4 times
1 to 500, 501-1000, 1001-1500, 1500-1800
you will run loop and then you will get to know the startIndex
what script did you start with?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 01:45 AM
@Arka Banerjee1 were you able to achieve your requirement? If yes, then can you please share the logic/code.